11. Shaders: shader graph

Setup

Texture

Texture and color

Water shader

Depth

Depth: raw value

To render depth-based effects (such as shoreline foam or darkening water), we must calculate the vertical distance between the water surface and the floor geometry beneath it. We do this by subtracting the depth of the water surface from the depth of the scene.

Depth: color

Depth: alpha

Depth: parameters

Foam

Ripples

Waves

The entire shader graph (without the fix):

Etc

< ^ >