Builtin Library
- ..
- .metadata17 B
- README.md803 B
- preview.png17.2 KB
- properties.yaml13.3 KB
- shader.wgsl67.9 KB
README.md
oceanSurface
The water surface of the spectral ocean. Geometry arrives already displaced by
ocean_displace, so this shader only decides what the surface looks like: the
normal summed across cascades as gradients (which is what adds when wave fields
overlap), a water column shaded by per-channel Beer–Lambert extinction over the
distance to whatever lies behind it, Fresnel reflection from the scene's own
reflection probes, subsurface scattering through backlit crests lit by the
scene's directional light, a sharp sun-glitter lobe, and foam
from the simulation's own breaking-wave mask plus a shoreline band. Opacity is
the extinction rather than an authored constant, so colour and transparency stay
consistent from a turquoise shallow to a near-black deep. Works from below as
well as above.