Wave height multiplier applied on top of the spectrum's physical Hs.
Maximum number of contact footprints this material can render at once.
Angular spread (radians) of the wave directions around the wind.
Significant wave height (m) derived from the current wind/height scale.
Colour the water drifts toward in the tonal variation (current / algae / pollution tint).
Approximate size of the large-scale tonal variation patches, in kilometers. Larger values give broader, slower-changing current/slick fields; smaller values break the water up into finer patches.
Crispness of the tonal variation patch boundaries. 0 keeps the soft FBM gradient; higher values (up to 1) narrow the transition band so the currents/slicks read as distinct, well-defined regions.
Strength of the large-scale tonal variation (currents / slicks).
Clear all contact footprints (no contact foam).
Upload the current set of floating-object contact footprints. Excess entries beyond contactCount are ignored. Cheap: it only copies into the preallocated uniform vectors, so it is safe to call every frame.
Stylized, OIT-compatible ocean surface material.
The wave field is a discrete set of directional components sampled from a JONSWAP spectrum tuned for the North Sea (gamma = 3.3), driven by a single physical input: the wind speed (m/s, U10). Peak frequency, wavelength and significant wave height follow the standard Pierson-Moskowitz/JONSWAP relations, so the wave sizes and spacing are physically plausible (e.g. U = 10 m/s gives Hs ~ 2.1 m and a peak wavelength ~ 88 m). The spectrum is sampled on the CPU whenever the wind changes and uploaded as uniform arrays; the shaders just sum the components.
All wave/foam animation is evaluated in world X/Z space so it tiles seamlessly across patched geometry. The material is wired for the OITRenderPass via attachOitVariants; because its OIT variants share this material's
uniformsobject by reference, animated uniforms (time, wind, colours) stay live through every transparency pass.