← Lab

Open Water

Tessendorf FFT, three cascades, Jerlov optics

Real ocean renderers do not add waves together, they inverse transform a spectrum. A Phillips spectrum says how much energy the wind puts into each wavenumber; multiplying it by a complex Gaussian turns that smooth curve into an actual random sea; and an inverse FFT turns the whole spectrum into a height field in one shot. That is Tessendorf's method, and it is what film and game oceans have used for twenty years. Here it runs as WebGPU compute in three cascades, stacked in one buffer so the whole ocean transforms at once for twenty three dispatches a frame, with tile sizes that share no common factor so the repeat is not findable. The colour is not chosen either. Water absorbs red about seventy times more strongly than blue, which is the entire reason the sea is blue, and feeding the measured absorption and scattering coefficients through the standard deep water reflectance gives the palette directly. One number, the chlorophyll concentration, walks the whole Jerlov scale: raise it and the blue is eaten first, exactly as real water turns green near a coast. Most of what separates this from a grainy version is filtering rather than simulation, though. A pixel at the horizon covers metres of water, so the surface is differenced over its own footprint, each cascade drops out where its texels fall below a pixel, and the detail that falls through is added back as roughness instead of being thrown away.