Creating Vertex Effects
So far, we have applied water textures to our water, but it’s still a flat plane. We can go further than that and make the ripples not only via textures but also by animating the mesh. To do so, we will apply the noise texture we used at the beginning of the chapter in the shader, but instead of using it as another color to add to the Base Color of the shader, we will instead use it to offset the Y position of the vertexes of our plane.
Due to the chaotic nature of the noise texture, the idea is that we will apply a vertical offset to different parts of the model, so we can emulate the ripples:
Figure 10.57: Default plane mesh subdivided into a grid of 10x10 with no offset
To accomplish something like this, you can modify the Vertex section of your shader to look like the following:
Figure 10.58: Ripples vertex effect
In the graph, you can see how we are creating a Vector whose y axis depends on the noise Texture we downloaded...