The subject's silhouette catches fire in countless rainbow gemstone facets, from a thin neon halo to structural digital breakdown.
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 src = texture2D(uTex, vUv); float d = depthAt(vUv); // 1 = subject, 0 = the room behind them // A soft bump right at the silhouette's transition zone: the rim the // flame roots from, not the subject's whole body. float rim = smoothstep(0.08, 0.4, d) * (1.0 - smoothstep(0.4, 0.92, d)); // Turbulence drifts upward and outward into the background -- (1.0 - d) // keeps it away from the subject's own body -- reach growing steeply // with amount so Ember stays a thin halo and Flood genuinely engulfs. vec2 drift = vec2(noise(vUv * 3.0 + uTime * 0.35) - 0.5, -noise(vUv * 3.2 + 11.0 + uTime * 0.45)) * 0.22; vec2 fUv = vUv + drift * (1.0 - d); float turb = noise(fUv * 6.0 - vec2(0.0, uTime * 0.9)) * 0.6 + noise(fUv * 13.0 - vec2(0.0, uTime * 1.4)) * 0.4; float reach = mix(0.05, 0.7, pow(uAmount, 1.4)); float core = clamp(rim + turb * reach * (1.0 - d), 0.0, 1.0); // A wider, softer pass of the same fields for the neon glow halo -- cheap, // since it reuses the noise already evaluated rather than a texture blur. float glow = clamp(rim * 1.4 + turb * reach * 2.2 * (1.0 - d), 0.0, 1.0); // Faceted gemstone shading: nearest-cell hash gives each facet its own // flicker and hue offset instead of one smooth flame body. vec2 fp = fUv * mix(6.0, 46.0, uFacetSize); vec2 fi = floor(fp); float facetFlicker = rand(fi + floor(uTime * 2.2)); float hue = fract(d * 0.15 + facetFlicker * 0.5 + uTime * uSpectrumSpeed * 0.12); vec3 jewel = hsv2rgb(vec3(hue, 0.85, 1.0)); // Peel: past the middle of the range, a second layer of facets drifts // further along the same current -- reads as flakes that have detached // from the main body rather than more of the same flame. float peelAmt = smoothstep(0.55, 0.85, uAmount); vec2 peelUv = fUv + drift * 1.8; float peelTurb = noise(peelUv * 8.0 - vec2(0.0, uTime * 1.1)); float peelMask = smoothstep(0.5, 0.75, peelTurb) * peelAmt * (1.0 - d); core = clamp(core + peelMask, 0.0, 1.0); // Disruption: only the very top of the range, the frame itself starts to // tear -- block-glitch offsets sampling for a fraction of cells that // grows with amount, so Flood ends in structural breakdown rather than // just being brighter. float discRegime = smoothstep(0.82, 1.0, uAmount); vec2 blockUv = floor(vUv * 26.0) / 26.0; float blockRoll = rand(blockUv + floor(uTime * 5.0)); float tearHit = step(1.0 - discRegime * 0.5, blockRoll); vec2 tear = (vec2(rand(blockUv + 3.1), rand(blockUv + 7.2)) - 0.5) * 0.06 * tearHit * discRegime; vec3 base = texture2D(uTex, clamp(vUv + tear, 0.0, 1.0)).rgb; vec3 lit = base + jewel * glow * mix(0.5, 1.6, uAmount) * (1.0 + uPulse * 0.6); float influence = clamp(core + glow * 0.4, 0.0, 1.0); gl_FragColor = vec4(mix(base, lit, influence), src.a); }