Introducing Deep Pool

Interfaces with
real depth.

Light, refraction and wake, solved on the GPU hundreds of times a second. Drag through it and everything under the surface bends.

Free for small teams · No card required

How it works

How it works

The hero sits under a sheet of heavy water: a damped wave equation on a 356×200 height field, stepped at a fixed rate. The cursor is a moving dimple. Each step it fills the water back where it was and digs it where it is now, so it conserves volume and, moving faster than the waves, leaves a true Mach-cone V behind it. It also ploughs a furrow, a trough between two ridges that stays where you drew it and creeps flat over about three seconds while the V travels away. WebGL can’t see the DOM, so the page paints its own hero (the real, selectable HTML above, word by word from the browser’s line boxes) into a texture. The display then looks at that texture through the water: it is refracted (crests magnify, troughs shrink), shaded by light focused through the swells and by the shadow raised water casts, tinted by water depth, and it catches a small studio light as one soft crescent on every swell, with a bloom around it on the dark page.

Pipeline (per frame)

pointer segment (shell) · click = drop      canvas 2560×1440 · sim 356×200 (Resolution 200)
 │
 │  fixed-step accumulator: rate from the CFL bound, 120–960 steps/s (Clear: 120/s = 2 per 60Hz frame),
 │  the frame’s pointer segment is split evenly across the steps, at most 16 steps per frame
 │
 ├─▶ WAVE ×n     state  RGBA32F (h, h_prev, f) 356×200  NEAREST, texelFetch, ping-pong
 │               ∇² 9-point isotropic: (4·Σedges + Σcorners − 20·c) / 6
 │               v = damp·(v + C2·∇²h + VISC·∇²v)        h = (h + v)·keep        (v = h − h_prev)
 │               push = depth·(B(last segment) − B(this segment)) + drop + 0.02·∇²h (only with VISC passes)
 │                      B = (4/3)(Ḡ_r − ¼Ḡ_2r), Ḡ = a Gaussian averaged along the segment (closed form, erf)
 │               h += push,  h_prev += push   (no kick)
 │               furrow: f = (f + D·∇²f)·keep_f − plough·(∫G_r − ¼∫G_2r) ds / (√π r)   (never enters the waves)
 │               sponge: damping ramps up over the outer 10% of the short side, 4/s at the edge
 ├─▶ VISC ×2s    after each WAVE, only when ν·Δt/Δx² > 0.12 (Glass: s = 2, 4 passes per step)
 │               v ← v + aⱼ·∇²v in Chebyshev pairs: Π(1 + aⱼλ) = T_s(1 + 2λ/L′)²
 ├─▶ SURFACE     2 targets (MRT), RGBA16F 356×200 LINEAR, of the surface h + f
 │               surf (h + f, Scharr ∂/∂x, ∂/∂y, det(I + F·Hess))      hess (h_xx, h_yy, h_xy, ·)
 ├─▶ GLINT       RGBA16F 640×360: the key light alone (same code as DISPLAY)
 ├─▶ DOWN ×4     320×180 → 160×90 → 80×45 → 40×23   dual-filter 5-tap
 ├─▶ UP ×3       80×45 → 160×90 → 320×180   8-tap tent; r adds each level (bloom), g carries the widest (coverage)
 └─▶ DISPLAY     canvas 2560×1440, opaque
                 surf: cubic B-spline from 4 bilinear taps → slope g → tone-map → soft limit → clear zone
                 hess: 1 bilinear tap → J = D(tone-map)·Hess → shape of the key light’s image
                 page: 1 tap offset by g·R, plus 2 more for R and B on the steepest slopes (dispersion)
                 caustics: 1/|det| per pixel · folds ^1.5 · dark: scale + glow · paper: capped shade, warm lines
                 paper: cast shadow from 2 bilinear height taps, 0.03 short sides toward the light
                 water: Beer–Lambert by thickness + in-scattered colour on dark
                 surface: Fresnel (raw slope) · soft key disc × saddle, stripe and coverage fades · soft lobes
                 glow: 1 bilinear tap of the 320×180 level · bloom on dark, coverage cap everywhere
                 highlight shoulder → linear → sRGB → ±½ LSB dither

 PAGE   on load, resize and preset change: DOM layout → Canvas2D, glyphs at their Range rects
        → SRGB8_ALPHA8 2560×1440 + mipmaps
 10 + n·(1 + 2s) draws per frame: 12 for Clear, 12–13 for Deep pool, 20 for Glass

The ideas that matter

Parameters

Presets

Performance & compatibility

References & credits