The same browser-run WebGPU water, pushed from a contained pool out to open-ocean and breaking-shore scale — spectral swell, depth-driven surf and foam, dry-region exclusion volumes, self-contained floating chunks, and a full underwater pass with god rays and depth fog.
Drag to look around · move toward the shore to watch the waves break · the dry box punched through the surface is an exclusion volume. Needs a WebGPU browser (Chrome / Edge, Safari 26+, or latest Firefox) — if the frame stays black, open it fullscreen ↗.
// open sea — wind-driven swell, whitecaps and a hazing horizon
An experimental offshoot of the WebGPU Water project — the same Unity 6 / URP renderer running in the browser via WebGPU, but scaled up from a contained pool to a whole coastline. Where the pool is a 256² interactive heightfield, this build layers a large-scale spectral swell for the open sea, a depth-driven breaking-surf and foam system at the shore, and a full underwater pass with light shafts and depth fog.
Three regimes share one body of water: the open sea — wind-driven swell, scattered whitecaps and a hazing horizon; the surf zone, where the seabed rises, waves steepen and break into whitewater that washes up the beach; and the world below the surface, lit by refracted god rays and caustics that fade into blue depth fog. Impacts throw up splash particles and droplet spray that settle back into foam.
Two newer systems break the water out of its own footprint. Exclusion volumes mark regions where the surface must not render — a hull interior, a room below sea level, a diving bell — carved from an analytic box or sphere, or from the real silhouette of an arbitrary mesh through a depth prepass; water walls close the cut so it reads as a solid slab of water rather than a hole. The carve is purely visual: buoyancy, physics and the ripple sim are untouched, so a hull still floats and still cuts a wake.
A chunk goes the other way — the same water body becomes a self-contained finite volume floating in dry air, box, sphere or arbitrary closed mesh, with its own fill level, a meniscus at the waterline, and its own refraction, reflectivity and god-ray shafts marched through the submerged column.