Unity

Water Shader

Waves computed in a compute shader, a separate caustics shader, CPU-driven reflections and scrolling normal maps for refraction.

In Unity

How it works

A water shader made in Unity.

  • Waves: their physics run in a compute shader, and the result is stored in a render texture that Shader Graph reads.
  • Caustics: a separate shader.
  • Reflections: computed on the CPU, then passed to Shader Graph through another render texture.
  • Refraction: two normal maps scrolling slowly in opposite directions.

The trees were made in Blender, and a dedicated shader animates their leaves.