Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

oceanFloor

The seabed under the spectral ocean: sand where the ground has settled, rock where it has not, lit through the water by a moving web of focused sunlight.

One noise field decides the whole terrain. Scaled, it is the relief the vertex stage raises the mesh into and the normal that shades it; unscaled, the same field picks between sand and rock — so rock outcrops stand on the high ground and sand fills the hollows, because the two are readings of one surface rather than independent patterns laid over each other.

Both ground maps carry albedo in rgb and height in a. The height is differenced into a detail normal that rides on the terrain's own slope as a gradient, so relief accumulates rather than one normal replacing the other.

The caustics are two layers of the caustics map scrolling against each other at slightly different scales and in opposite directions, displaced by the horizontal displacement of the water directly overhead — which is what makes the web ripple with the surface instead of sliding across the ground as one rigid sheet. Each colour channel is read at its own small offset, giving the chromatic fringe focused light through a dispersing medium has.

The seabed applies NO absorption of its own. The water column above it belongs to the water surface, which knows the real distance the light travelled through water; attenuating here as well would darken the ground twice.

The mesh follows the viewer, so floor_center carries where it currently sits and every terrain and texture lookup is made in world space. That is what keeps the ground still while the mesh slides beneath it.