@name Temporal Supersampling
@persist [E]:entity Count Alpha N [P DP]:vector [A DA]:angle

if(first())
{
    runOnTick(1)
    
    function holoStuff()
    {
        for(I = 1, Count)
        {
            holoPos(I, P + ((DP / Count) * N * I))
            holoAng(I, A + ((DA / Count) * N * I))
        }
    }
    
    Count = 10
    
    E = entity():isConstrainedTo() ?: entity()
    
    if(E != entity())
    {
        entity():setColor(vec4())
        #entity():propGravity(0)
    }
    
    Alpha = (E:getAlpha() / (Count)) * 4
    E:setAlpha(Alpha)
    
    P = DP = E:pos()
    A = DA = E:angles()
    
    N = 1
    
    for(I = 1, Count)
    {
        holoCreate(I)
        holoColor(I, E:getColor4())
        holoMaterial(I, E:getMaterial())
        holoModel(I, E:model())
        holoSkin(I, E:getSkin())
        holoAlpha(I, Alpha)
    }
}
else
{
    P = E:pos()
    A = E:angles()
    
    DP = $P
    DA = $A
}

for(I = 1, Count)
{
    holoStuff()
}

print(4, toString(cpuUsage() * 1000000))

