The video shows a breakdown of my latest water shader, made with Unity using URP. The shader features the following.
- Distance based colouring
- Vertex displacement
- Blinn-Phong specular reflection
- Height derivative maps, for flow dependent normals
- Flow map UV distortion
- Transparency with underwater tinting
- Tri-planar projected caustics
- Additional fake specular effects
- Interactive ripple particles that affect flow
- Planar reflections
The caustics and ripple particles can be seen better in the following clip.
- Water shader
- Mixture (noise textures)
- Unity 2020.3 URP (rendering)
This shader was inspired by the following references/tutorials, which are ordered by content creator.
- Alan Zucconi
- A great introductory tutorial on making believable caustics
- Half Past Yellow
- Jasper Flick (Catlike Coding)
- Joyce (Minions Art)
- She has a quick and concise tutorial on adding tessellation to URP shaders
- Another great tutorial is on adding water ripples using the particle system and an orthographic camera
- Ned (Ned Makes Games)
- The projected tri-planar mapping requires scene normals, which Ned has a tutorial on using SRP’s render features.
- Simon Trümpler (Simon schreibt)
- His talk about the water of Rime was the main inspiration for this shader
- Unity (you know, the engine company)
- A script from their boat attack demo project is used to for sampling planar reflections