Log inGet started
World

First Light: Crowfeet

Branchmain
Branchesmain
Commit0f27cfd84c

README.md

water

The sea at the foot of the cliff. A flat plane lifted by four travelling waves in the vertex stage; the fragment rebuilds the same waves analytically for its normal, adds two octaves of wind ripple, and shades itself: a dark body colour graded by depth, a Fresnel term toward the sky, one hard specular track for whatever light is in the scene, foam on the crests, and a wash of foam where the water meets the rock, read from the scene depth already drawn behind it.

It shades itself rather than handing the engine a PbrSurface, because a mirror-smooth PBR water reflects the environment probe as a hard mirror of the face the camera is already looking at. Everything the sea's look depends on is therefore a named property, and Cliff.component drives the four colours, the specular strength and the foam from CF.state.dawn.