The live demo starts when it’s in view.Click the water to splash · drag to orbit
The wave equation as compute on a ring of cells that follows the camera, a smooth Catmull-Rom read, an absorbing edge and a coarse second field for long wakes…
What it costs a frame
GPU
0.32 ms
CPU
0.23 ms
02468101216.7 ms
GPU
0.32 ms
CPU, median
0.23 ms
CPU, 95th pct
0.42 ms
Draw calls
8
Weight
Light
Measured 3 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
3.90
0.66
1.06
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
1.64
0.51
0.83
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.
What it needs
Renders with
WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
Your browser
Runs hereNo WebGPU needed
Depends on
three.js 0.187.0No other packages
What it’s for
Pools, ponds and lakes
Boat and swimmer wakes
Rain on water
Splashes from impacts
Puddles
Pitfalls, in brief
A render-target step flips rows under WebGPU and mirrors every wake: keep the field in storage buffers (a ring of cells addressed by world cell modulo its size), as here.
Without WebGPU (three’s WebGL2 backend: no compute), pass textures: WaterWakes.needsTextures(renderer): the same step, cell for cell, as render-target ping-pong in 32-bit float targets (the cells’ world tags are whole numbers a half float cannot hold), every read a textureLoad.
A four-cell smoothstep read terraces the rings (flat at every cell centre): read the slope with Catmull-Rom over 4×4 cells for the surface.
Without an absorbing edge, waves bounce back off the field’s square border; without a faded read, the wake stops at a hard line.
Nine-cell neighbourhood, not five: the four sides alone spread a wave as a diamond.
3 more in brief
The step runs at a fixed 30 Hz and the shader eases between the last two slopes; a drop on a frame with no step due must still land (the update forces one).
The surface reads the frame drawn so far (viewportSharedTexture): draw the bed first, the water after it (transparent, renderOrder), one frame copy a frame.
three r187: a shared frame copy (viewportSharedTexture) can be created 8-bit before the renderer’s half-float frame target exists; then every copy fails (“Source and destination formats do not match”) and the refraction shows nothing.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
Where it comes from
From HaTac. Fully custom code.
Evan Wallace, WebGL Water: The ripple step is his wave equation (height pulled toward the neighbours’ average, damped), and the caustics follow his idea: compare where refracted rays land through a flat and a wavy surface.
jeantimex/webgpu-water: A WebGPU port of Wallace’s water that inspired moving the step to compute and the roadmap (caustics, refraction, floating things).
Roads as plain data (nodes, edges drawn through bends and rounded to arcs, a type on each) laid out into junctions with kerb returns and setbacks, then…