Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

ocean_displace

Displaces the ocean surface mesh by one cascade, once per cascade per frame. The first cascade writes each vertex from the rest position stored in its UV and the rest accumulate onto it, so the mesh is rebuilt from a clean grid every frame instead of drifting. Cascades are sampled at the vertex's true world position — the mesh follows the camera, so its rest grid sits at a moving origin. The vertex normal accumulates each cascade's surface gradient (the ratio n.xz / n.y), which is how independent wave fields actually combine; per-fragment normal detail comes from the cascade normal maps in the surface shader, since the mesh is far too coarse near the horizon to carry it.