Builtin Library
- ..
- README.md572 B
- bindings.yaml541 B
- shader.wgsl8.4 KB
README.md
ocean_spectrum
Builds one ocean cascade's time-independent complex wave amplitude h0(k) from
a JONSWAP directional spectrum: a Phillips energy core, Donelan–Banner
directional spreading around the wind, a JONSWAP peak enhancement, and a
k_min/k_max band limit that keeps each cascade to its own disjoint range of
wave numbers. The result is randomised into a complex Gaussian so the same sea
state produces a real random surface rather than a deterministic ripple. Runs
when the sea state changes, not per frame — ocean_evolve animates the field it
writes.