Organic cellular fracture — safety glass mid-break.
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(){ float cells = mix(4.0, 26.0, uDensity); vec2 g = vUv * cells; vec2 gi = floor(g); vec2 gf = fract(g); float d1 = 8.0; float d2 = 8.0; vec2 bestCell = gi; for (int y = -1; y <= 1; y++) { for (int x = -1; x <= 1; x++) { vec2 o = vec2(float(x), float(y)); vec2 cell = gi + o; vec2 h = vec2(rand(cell), rand(cell + 7.3)); vec2 p = o + h; // Reuse h for the drift phase — rand() is a sin internally, so hashing // again here doubled the transcendental cost of every cell. p += 0.25 * vec2(sin(uTime * 0.7 + h.x * 6.28), cos(uTime * 0.6 + h.y * 6.28)); float d = length(p - gf); // Keep the two nearest sites: their difference is the cell border. if (d < d1) { d2 = d1; d1 = d; bestCell = cell; } else if (d < d2) { d2 = d; } } } vec2 jitter = (vec2(rand(bestCell + 1.7), rand(bestCell + 9.2)) - 0.5) * uDisplace * 0.25; vec2 muv = abs(fract((vUv + jitter) * 0.5) * 2.0 - 1.0); vec4 col = texture2D(uTex, muv); float edge = smoothstep(0.0, 0.07, d2 - d1); col.rgb *= 0.2 + 0.8 * edge; col.rgb += vec3(0.6, 0.8, 1.0) * (1.0 - edge) * 0.3; gl_FragColor = col; }