Sprint 2, Week 4: Water Shader
- Shiyu
- May 10, 2021
- 2 min read
Updated: May 24, 2021
Hi it's Shiyu again. Today I tried making water. I looked on the asset store but there were no suitable ones. So I browsed youtube and searched for a tutorial. Alas, i found one.
I followed Brackeys' Tutorial https://youtu.be/Vg0L9aCRWPE
I wanted to make a simple cartoon water for the pond.
Here's how the final looked like.

First, I created a PBR shader in a URP project, then created a material for the shader.
Then created a blue base color for the water.

Then added voronoi to simulate random noise. This will be the water's pattern.

Then I created a time and multiply node to the angle offset to add some distortion to the noise for random water pattern movement. RippleSpeed is a Vector1 connected to multiply to control the speed of the cells' random movement.


Then I added another Vector1 and named it RippleDensity to control the density of the cells.
Next, I wanted to make the cells bigger so the lines between them will be thinner. I added Power to multiply to increase the size of the cells.
RippleSlimness is there to help control the white lines size, the smaller the number the bigger the space.

Then, I created a Color property and named it RippleColor to add color to the ripples. I used bright blue, almost close to white.
The mode of this color property is changed to HDR to control the intensity of the brightness / color.

Then another multiply is added to multiply the power and color together.
Then a new Add is added to add the ripple and base blue water color together.
And then it is added to the Albedo of the material.

Up till here, this creates a flat water shader. I want to add some wave / movement to the water.
So to give the water some vertical movement. I added Gradient Noise, then added Tiling and Offset with time + multiple. The latter will enable constant movement from Tiling and Offset.


Lastly, connect the GradientNoise to PBR Master(Mat) and it's done!



Comments