Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

ocean_foam

The persistent whitecap field: a world-space region, following the viewer, in which foam accumulates where the sea folds and drains everywhere at a fixed half-life.

Shading foam directly from the instantaneous fold makes it blink with the wave that caused it. This field is what gives a broken crest a wake of white behind it, and what the surface's waves foam layer is actually gated on.

Run once per frame, after every cascade's ocean_normals. The two history buffers swap roles each frame; the caller binds whichever holds last frame's result as previous.