4 ms·
A few recognizable parts: *.5-(pos.xy;1)%size.x This produces a vec3 of the screen-space coordinates of the fragment, scaled to a -0.5 to 0.5 range (assum
by RodgerTheGreat 7y ago
A few recognizable parts:
*.5-(pos.xy;1)%size.x
This produces a vec3 of the screen-space coordinates of the fragment, scaled to a -0.5 to 0.5 range (assuming a square display) and the z component will be the scaling factor. This also happens to invert the axes, which doesn't matter.
x.xy*:mat[cos a;sin a;-sin a;cos a]
This is a standard 2d rotation matrix- rotate the position xy about the origin by angle a.
Your comment is a good description of the overall algorithm.