TechniquesNewLiving water: lakes, rivers, falls and drift from the ground, with a live current round the camera
The HaTac engine’s water as one kit, in raw WebGPU.

A 2D scene lit only by what happens in it.
Each frame the game lists its walls, bodies and lights (shots, sparks, braziers, flares, blasts) and pushes on the smoke; lit-arena lights them with radiance cascades over a distance field rebuilt by jump flooding, so every wall and body casts a soft shadow, glazed walls throw their colour back, and the frame costs the same with ten lights or a thousand. Smoke and fire run on a screen-sized stable-fluids grid: blasts push smoke out in rings, bullets cut lanes through it, the wind carries it, and fire lights its own smoke from inside, because the cascades march through the grid. Soot stays where things burned. On a web page (mountLitPage), the same light sits on a transparent canvas behind the content: headings, cards and images are read from their DOM rects as walls that cast soft shadows and bounce their colour, the pointer carries a lantern, a press strikes a flash, text stays crisp and never drops below 4.5:1 contrast, it rests when idle and off screen, shows one still lit frame under reduced motion, and falls back to CSS gradients without WebGPU. Raw WebGPU with its own bloom and grade, a Canvas 2D tier (soft light pools and puff smoke, no shadows) where WebGPU is missing, three quality tiers, and reduced motion that eases flashes into swells. No textures, models or dependencies.
Measured 28 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 158, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 7.29–8.71, CPU 0.80–0.89 ms). What ran: The bare court alone, full stage: 400 drifting lights, four braziers, a smoke pot and a blast every 3.5 s. The light field (radiance cascades over a jump-flood distance field) and the smoke grid are sized by the stage, not by the lights; the number is the whole frame, smoke step to present. Phones: tiers are being measured next.
| Machine | GPU ms | CPU ms | CPU p95 |
|---|---|---|---|
| RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool | 8.27 | 0.80 | 1.23 |
| NVIDIA GeForce RTX 4060 Laptop GPU · 13th Gen Intel(R) Core(TM) i9-13900Hmeasuring tool · 28 November 2026 | 5.66 | <0.01 | <0.01 |
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
install("lit-arena")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it upWritten for the library. Fully custom code.
Hannes Andersson: Feature Library effect and demo.
Alexander Sannikov: Radiance cascades: probes whose ray count grows and spacing widens by cascade, each casting a farther interval, merged top down. Written out here from the paper’s description; no code taken.
Guodong Rong and Tiow-Seng Tan: Jump flooding (2006): the distance field the rays step along, rebuilt each frame in log2(size) passes. Written from the method’s description.
Jos Stam: Stable fluids (1999): semi-Lagrangian advection and a pressure projection; vorticity confinement after Fedkiw, Stam and Jensen (2001). Written from the papers’ descriptions.