# How to render water reflections on multiple heights

I'm making a voxel game on OpenGL, and are trying to find a way to render semi-realistic water (At least partially good looking, it doesn't need to be strictly scientific accurate).

All sources written about that topic I find seem to assume that all the water in the scene has the same height, which is not the case on a voxel game, where you can have (And see at the same time) multiple bodies of water, with different height each.

The tricky detail lies in the multi-height part of the problem, which makes really difficult to render the scene in real time using typical water reflection algorithms aimed at single level water surface.

As an example, consider the following image:

The dirt pillar at the left should be reflected on the water at its front, as so should be the mountains near the horizon. The water collindant to the pillar is ~20m higher than the general sea water, so traditional reflection methods (Considering a fixed water level) would simply not work in this case. Considering that a lot of different water levels can be seen in a single scene, performing a traditional water reflection method for each water body height is not an option if we want to achieve a acceptable frame rate execution.

How can I overcome this problem? There is any way to render it in real time? If it isn't actually possible to do, what approximation should I take to get a good looking result, even if reflections aren't 100% realistic?

• There's no way, those mountains get reflected on the water in real life, Commented Jan 30, 2016 at 18:36
• The last picture was more confusing than useful: I uploaded a new one. Hopefully, the problem can be seen clearly on the actual one. Commented Jan 30, 2016 at 18:53
• This is quite complex to do, especially with voxels. Have you ever seen a voxel game with reflections? Commented Jan 30, 2016 at 19:00
• @Bálint No i havent, its true. I was just curious about if it was some way of doing that, or if it simply was impossible, altough there must be some kind of approximation to that problem wich produces a good looking result (Reflecting the nearest water body and just showing the sky on the others, etc.), even if its not realistic at all. Commented Jan 30, 2016 at 19:15
• Showing only the sky is possible, with a cubemap for example, but in this case, it would destroy the illusion. Commented Jan 30, 2016 at 21:00