Map luminance to a rainbow.
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 l = dot(c.rgb, vec3(0.299,0.587,0.114)); vec3 rb = hsv2rgb(vec3(fract(l + uTime*uSpeed*0.2), 1.0, 1.0)); gl_FragColor = vec4(mix(c.rgb, rb, uAmount), c.a); }