Cinematic edge darkening with optional color.
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 c = texture2D(uTex, vUv); float d = distance(vUv, vec2(0.5)); // Max size capped at 0.95: the corners of a UV square are only 0.707 from // centre, so a size of 1.5 put the entire falloff outside the frame and the // vignette silently did nothing. float v = smoothstep(uSize, uSize*0.35, d); gl_FragColor = vec4(c.rgb * mix(1.0, v, uAmount), c.a); }