HDR wake · bloom · god-rays · aberration

Light, with a memory.

The wake burns white-hot at the cursor and cools as it ages, then the whole frame runs through a film-style post stack. Switch each pass off to see what it adds.

How it works

How it works

A small stable-fluids wake carries two numbers per texel, how much dye is there and how old it is, so its colour is literally its history: white-hot where the cursor just passed, cooling through the palette as it curls away. That HDR light then goes through the stack a film camera would add: a mip-chain bloom that stays steady on hair-thin strands, a light behind the cursor that escapes only through the gaps in the wake as shafts, spectral fringes that spike with speed, lens dirt, grain and a filmic tonemap. Every post pass can be switched off from the stage or the panel, and the View menu shows each buffer on its own.

Pipeline (per frame)

Sizes for a 2560×1440 canvas. S = sim grid 228×128, D = dye 1820×1024, F = canvas.

FIXED 60 Hz STEP (a 120 Hz screen runs it every other frame)
 pointer ─▶ brush spring (ω 52 rad/s, 4 sub-steps) ─▶ 4 short segments along a smooth curve
   ├─[grip splat]     bbox quad, blend SRC_ALPHA: v = mix(v, 0.7·v_brush, w·0.34) ─────▶ vel   S  RG16F
   ├─[dye splat]      bbox quad, blend ONE,ONE: swept-Gaussian (erf) × filaments ──▶ dye   D  RG16F
   │                  .r = d (density)   .g = d·age (new dye adds age 0)
   ├─[curl]           vel ─▶ curl  S R16F
   ├─[vorticity]      ε·ω·(N.y, −N.x) ─▶ vel
   ├─[viscosity ×6]   Jacobi (I − ν·dt·∇²) v = v₀, ν 40 ─▶ visc
   ├─[divergence]     ½ central differences, open edges ─▶ div  S R16F
   ├─[pressure ×16]   red-black SOR ω 1.8, warm start ×0.8, p = 0 outside ─▶ p  S R16F
   ├─[gradient]       v = visc − ½∇p ─▶ vel
   ├─[MacCormack ×2]  dye ─A▶ tmp ─B▶ dye: clamp to the 4 source texels, ×e^(−fade·dt), g += d·dt
   └─[advect vel]     semi-Lagrangian, ×e^(−0.55·dt)

EVERY RENDERED FRAME
   ├─[emission]       dye ─▶ B0  F/4 640×360 RGBA16F
   │                  16-tap supersample → 4 boxes, Karis 1/(1+luma) → soft knee → sanitise
   ├─[down ×5]        13-tap COD:AW kernel ─▶ 320×180 … 20×11   (levels from resolution)
   ├─[up ×5]          3×3 tent, blend lerp(radius): 20×11 ─▶ … ─▶ 320×180 ─▶ B0 (= the bloom)
   ├─[ray mask]       dye ─▶ R0  F/4 640×360: gaps only = clear texel (4 taps) × wake around it
   │                  (8-tap ring, 1.2 brush widths) × hollow light field at the smoothed pointer
   ├─[rays ×2]        radial blur toward the light: 28 long taps, jittered start ─▶ F/4,
   │                  then 28 short ─▶ F/4
   └─[composite]      ─▶ canvas F 2560×1440 (RGBA8, opaque)
                      emission: 5–8 jittered spectral taps on E/(1+E) (lens + fluid-velocity
                      offset, none across the white-hot head) + bloom (lens R/B split)
                      + rays (soft contrast) + dirt × wide mip ─▶ exposure ─▶ vignette
                      ─▶ hue-preserving ACES (per-channel on the hot head) ─▶ sRGB
                      ─▶ clear zone behind the copy ─▶ screen over page colour
                      ─▶ 24 Hz grain ─▶ TPDF dither

31 draws per sim step + 15 per frame ≈ 46 draws at 60 Hz

The ideas that matter

Parameters

Presets

Performance & compatibility

References & credits