First tests with water
The video shows my first tests with water in the engine. The method comes from chapter 19 of GPU Gems 2, and it is two-pass rendering: the scene is drawn once for refraction and once for reflection before the water itself goes on top.
- Render everything except the water. This is the refraction pass.
- Copy the image into the refraction map.
- Render everything again from the “reflected” camera, which is the camera position mirrored across the water plane.
- Copy that image into the reflection map.
- Render the water using the reflection and refraction maps.