A proof of concept that the open ocean in my game can look real and run at frame rate. It opens with a slow camera tour, and any key hands you the camera. Number keys change the sea state from glassy calm to storm. There's also time of day, cloud cover, rain and lightning.
How it works
- Waves: a JONSWAP wind sea with Donelan-Banner directional spreading plus a long swell, split over three FFT cascades (1,024 m, 161 m and 24 m) and evolved exactly in time. They run on the CPU in about 3.5 ms across cores, so the yacht floats on exactly the surface the GPU draws.
- Whitecaps form where the surface folds. Each cascade's breaking threshold is steered toward Monahan's measured whitecap fraction for that wind speed.
- Shading: Fresnel reflection of sky and clouds, sun and moon glints (GGX plus a sparse Beckmann sparkle lobe), light scattering through backlit crests, Snell's window from below, and an overcast sky model for storms.
- The yacht responds to the sea, heels, pushes a bow wave and leaves a spreading foam wake.
Performance and quality
- Clouds render at half resolution in their own pass, taking large steps through clear air: from about 30 ms to 1 to 2 ms per frame.
- Waves and wake run on the async compute pool, overlapping the rest of the frame.
- Visual quality was tuned through structured review passes against side-by-side screenshots at every sea state, from glassy calm to storm.
Tests cover the waves, sky, wake, yacht and shaders. A script renders off-screen check scenes into a contact sheet. The ocean is now kit_ocean and kit_boat in the DevKit.