How it worksA real sea isn't a few waves but a continuous spectrum of thousands, and summing them one by one is hopeless. The trick (Tessendorf, 2001) is to work in the frequency domain: sample an empirical ocean spectrum (Phillips) to give every wavevector a random complex amplitude — the ocean is a Gaussian random field — then march each one's phase by its own deep-water speed ω=√(g·k). A single inverse FFT turns that whole frequency field into a height map in one shot; another recovers the horizontal displacement that sharpens crests into the Gerstner shape. The whole thing runs on the GPU each frame: a compute pass evolves the spectrum, then radix-2 butterfly passes (a precomputed schedule, bit-reversal baked into the first stage) do the inverse FFT, and a final pass assembles the height and displacement the grid is then drawn from — normal and fold-based foam coming from the neighbouring cells. It is the same machinery behind Sea of Thieves and Black Flag.