Barrel/pincushion distortion.
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 p = vUv-0.5; float r2 = dot(p,p); // Real glass disperses as it bends; per-channel fringing is what makes this // read as a lens rather than a plain pinch. float k = 1.0 + uAmount*r2*2.0; vec3 col; col.r = texture2D(uTex, p * (k * (1.0 + uFringe*0.10)) + 0.5).r; col.g = texture2D(uTex, p * k + 0.5).g; col.b = texture2D(uTex, p * (k * (1.0 - uFringe*0.10)) + 0.5).b; // Alpha follows the un-fringed lens curve (the green channel's UV) — a // transparent source's silhouette barrels/pinches with the lens, just // without the chromatic fringe that only applies to color. gl_FragColor = vec4(col, texture2D(uTex, p * k + 0.5).a); }