How it works

How it works

The classic Stripe hero gradient, rebuilt as a material. A tessellated sheet is tilted, twisted and displaced along its normal by slow simplex noise in long, sideways-stretched drapes, then painted with four colours over a base, in a fixed order, each with a smoothstep()^4 weight so every colour owns its own region instead of averaging into mud. Real normals from that displacement give the drapes relief and a satin sheen. Your cursor stirs a small viscous fluid that lives in the sheet's own coordinates. It presses a soft trough into the silk along your path and drags the colours with it, and both relax back over about three seconds.

Pipeline (per frame)

pointer segment (screen) ──▶ CPU: Newton-invert the sheet transform ──▶ segment in sheet coords
        │
        ▼  only while a wake is alive (8 × linger + 1 s after the last move; then skipped entirely)
 [splat]    v ← mix(v, pointer velocity, 1 − (1 − capsule·grip)^(dt·60))   RGBA16F 168×128, sheet space
            capsule r 0.42 from last segment to this one; grip = 0.36 × Wake strength
 [viscous]  6 × Jacobi on (I − ν·dt·∇²) v = v₀                              same grid
 [project]  divergence → 12 × Jacobi pressure (warm start × 0.8^(dt·60)) → v −= ∇p
 [advect]   v ← v(x − v·dt) / (1 + 0.6·dt)
 [wake]     D ← blur₅(D)(x − ½·v·dt) + 0.3·v·dt,  D ×= e^(−dt/linger)        RGBA16F 168×128
            E ← blur₅(E)(x − ½·v·dt) + 0.3·|v|·dt, E ×= e^(−dt/linger)       (xy = D, z = E)
            blur weight 0.15 per 60 Hz frame, ramping to 0.95 as |∇drag(D)| goes 0.3 → 0.65
        │
        ▼  every frame while the wake is alive, otherwise 30 fps (the canvas keeps the last frame)
 [field]    m = s − drag(D);  m.y += 0.4·h(m)                                RGBA16F 480×360 (0.17 MP)
            Oklab: base, then 4 layers  w = smoothstep(lo_k, hi_k, n_k)^4,    texture-space shading,
            noise time + 0.12·ê (stir); later layers rarer and crisper;       then generateMipmap
            layer 3 only inside layer 2; mix + 75% chroma restore
        │
        ▼
 [sheet]    VS  220×164 grid (36k verts): h = fold(m, t) − trough             default framebuffer
                fold: 2 octaves simplex at Fold frequency, x stretched 3×     RGBA8, alpha off, depth
                trough: 0.11 × Wake strength × ê,  ê = E saturated to 0..1    1920×1080 at DPR 1.5
                h scaled down where the sheet is seen at a grazing angle
                tilt + twist about x, roll about the view axis, perspective
                lighting normals one wake texel apart, fine octave damped
            FS  field → linear sRGB; wrap diffuse + satin lobe relative to
                the flat sheet; light pages: shade with chroma, top-left
                depth ramp; dark pages: glow from field mips 2.5 and 4;
                shoulder + grain on the silk only;
                page + soft shadow under the hem (band presets);
                sRGB encode → TPDF dither ±1 LSB (last op; silk and shadow only)

The ideas that matter

Parameters

Presets

Performance & compatibility

References & credits