Motion leaves burning trails that decay over seconds — real accumulation, not a blur.
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(){ vec4 cur = texture2D(uTex, vUv); // Sample history slightly spread so trails smear as they fade. vec2 g = (1.0/uResolution) * (1.0 + uBleed * 6.0); vec3 hist = texture2D(uFeedback, vUv).rgb * 0.5 + texture2D(uFeedback, vUv + vec2(g.x, 0.0)).rgb * 0.125 + texture2D(uFeedback, vUv - vec2(g.x, 0.0)).rgb * 0.125 + texture2D(uFeedback, vUv + vec2(0.0, g.y)).rgb * 0.125 + texture2D(uFeedback, vUv - vec2(0.0, g.y)).rgb * 0.125; // Capped below 1.0 so energy always drains — no runaway white-out. float keep = uPersistence * 0.92; gl_FragColor = vec4(max(cur.rgb, hist * keep), cur.a); }