ATi and Nvidia both have tools to generate du/dv normal maps from a height map. They are only red and green, this allows us to distort the texture coordinates of the reflection and refraction texture in the s and t directions by adding the du/dv normal map. Of course, the quality of the water depends on the quality of the normal map.ĭu/dv normal map are almost the same like standard normal maps.
I assume that you have a normal map of the watersurface and the corresponding du/dv normal map. * Update:Please use the comments to contact me* Since this is my first tutorial, please send your feedback, questions or errors to I tried to keep things as easy as possible. This tutorial doesn’t describe the basics of OpenGL, such as writing a base code or loading extensions, but everything you need for the water effect. The algorithm presented here is best suited for small areas of water. Unfortunately, there isn’t much information on the internet for doing this. But now it is possible to render realistic water in realtime. – Rendering the refraction & depth textureīefore vertex & fragment shaders came out, it was very hard to simulate water. – How the efffect is composed (Flow Chart)