Website powered by

Shader Learning - Dev Log 25/11

Work In Progress / 27 November 2025

Water movement - 25-11-25

As a way to help monitor my progress with Unity shader and techinical learning, I’ve decided to dedicate a mini-blog series towards figuring this out and hopefully see some progress! I thought as a theme for these blogs I would do them based around the 4 main elements - water, fire, wind and earth.

To kick this off, I’ve started out by creating a stylised water shader. I wanted to create something that felt fresh visually and would also react to any objects or elements in its surrounding. I found this tutorial to help develop my understanding on how to create this, as well as learning more about subgraphs and their role in creating tidier shader graphs.

To obtain depth, the data needs to be obtained from the scene depth and subtracted by the screen position (water depth = scene depth - screen position). Then, divided by a float to determine the distance (default set to 0) and then put through a saturate node, to determine whether the alpha return comes back between 0 and 1.


visual feedback from depth fade in scene

applying colour


Using screen positioning and applying movement and normals I was able to recreate a reflective surface. This worked really well, although the tutorial I used was a bit out of date so it required some tweaking.


first result; following along tutorial
second result; buffering screen position reflection in water + added foam

By adding a scene depth node to the screen positioning, it was able to buffer out the camera positioning better so the results werent quite as literal with the water reflections. The tutorial also suggested seperating out the foam colour with a split node and multplying the alpha with the step, however this ended up making the effect not work and removing the split was the most effective method to get it working.

Lastly, to really capture the effect I wanted to add a fish silhoutte to the scene and get movement on it to see how it would react with the current shader set up. In order to animate this, I understood I would need to manipulate the vertex in shader graph on the fish model along the X axis to capture this effect, but in order to achieve this I used a quick tuturial to understand the set up for this (which turned out to be very straight forward). 


Overall, I am pleased with what I’ve achieved today, I would really like to elevate this with some player interaction (puddle splashes, water ripples, etc) for now I am happy to let this rest where it is though. All tutorials and materials used will be referenced in the following links;

https://www.youtube.com/watch?v=MHdDUqJHJxM - water shader 

https://www.youtube.com/watch?v=voegALuuO2I&t=622s - fish shader

https://assetstore.unity.com/packages/3d/environments/fantasy/stylized-environnement-free-pack-178090 - environment assets

https://sketchfab.com/3d-models/green-fish-e8c06ff391bd4265931049b3f3c554d9 - fish model