This shader was ported from this video here and some parts were taken from the awesome tutorial by Kmitt 91 and the water shader tutorial by Bastiaan Olij. To understand how the Water shader works in Godot specifically, I would recommend watching both of the two Godot videos.
The shader has
- Waves with customizable strength, frequency and time factor
- DepthFade between a Shallow and Deep water color
- Customizable flow speed
- Foam with custom color (using 2 noise textures)