The frame becomes a sheet of moulded glass — living crystal that bends the light behind it.
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(){ // Height field -> surface normal -> refracted offset. Modelling it as a // real surface rather than a UV wobble is what makes it read as glass // instead of as a ripple filter. float s = 2.0 + uFacets * 14.0; vec2 q = vUv * s + uTime * 0.12; float h = noise(q); float hx = noise(q + vec2(0.09, 0.0)); float hy = noise(q + vec2(0.0, 0.09)); vec2 n = vec2(hx - h, hy - h) * 9.0; vec2 off = n * uThickness * 0.075; vec4 srcTex = texture2D(uTex, clamp(vUv + off, 0.0, 1.0)); vec3 c = srcTex.rgb; // Dispersion: the channels take slightly different paths through the // thickness, which is the giveaway that light passed through a solid. c.r = texture2D(uTex, clamp(vUv + off * 1.12, 0.0, 1.0)).r; c.b = texture2D(uTex, clamp(vUv + off * 0.88, 0.0, 1.0)).b; // Specular from the same normal — free, and it makes the surface read // as having a direction it is being lit from. float spec = pow(max(0.0, dot(normalize(n + 0.0001), normalize(vec2(0.6, 0.8)))), 3.0); c += spec * uSheen * 0.4; // Alpha rides the un-dispersed (green channel's) refracted position — // a transparent source's silhouette bends through the "glass" with its // color, just without the per-channel dispersion that only applies to // hue. gl_FragColor = vec4(c, srcTex.a); }