Volumetric light shafts from a moving source.
GLSL fragment shader
The effect's own code. The uniforms and helpers above it — uTex, uFeedback, the depth proxy, the frame ring, depthAt(), timeAt() — are the same header every Ether-MOSH shader opens with, and are documented once on the registry rather than reprinted on all 143 pages.
void main(){ vec2 src = vec2(0.5 + sin(uTime*0.2)*0.3, 0.5 + cos(uTime*0.15)*0.3); // 8 march steps instead of 12, each proportionally longer so the shafts // reach just as far. The falloff hides the coarser sampling. vec2 dir = (vUv - src)/8.0; vec2 uv = vUv; vec3 acc = vec3(0.0); float w = 1.0; for (int i=0;i<8;i++) { uv -= dir; vec3 s = texture2D(uTex, uv).rgb; float l = max(0.0, dot(s, vec3(0.299,0.587,0.114)) - 0.4); acc += s * l * w; w *= uDecay; } vec4 c = texture2D(uTex, vUv); gl_FragColor = vec4(c.rgb + acc*uAmount*0.45, c.a); }