I've been working on a simple game with semi-realistic water. I followed some tutorials to get:
- a flat water surface
- reflection and refraction (blended using fresnel term)
- ripples using a bump/normal map
Next step, I created a mesh to form actual waves. I'm animating it, and it looks great (for my intents and purposes).
Normally, to get the reflection, I would render everything on a second camera, which is actually the normal camera, but mirrored over the water plane, like in the image below:
Then, just sample that camera's output to find the reflected color. Obviously, this technique doesn't work if the water level isn't consistent. In other words, with an animated mesh, this looks terrible.
Can anybody suggest a different way to implement reflections? Or show a workaround method?