Water Shader2022-07
With Shader Graph in Unity URPWater shader with dynamic configurations, which can simulate several environmental effects.
Implementation
- Water depth effect using Scene Depth node (Camera Depth Buffer) and Screen Position node (Fragment Position)
- Refractions using Screen Color node to render distorted objects behind the water, using Normals generated from height from a gradient noise.
- Foam generated using the Scene Depth node and a gradient noise.
- Waves achieved with geometry displacement, adding Normals multiplied by a gradient noise, effectively deforming the fragment geometry.