Here is a youtube video showing my problem:
I think I'm either doing the texture lookup on the reflection texture wrong, or the reflection or view matrix is somehow wrong.
The reflection matrix is calculated after Goldman formula with plane normal pointing in positive y-Axis (world up vector).
- WorldRenderer.cpp#L97 (
renderClippingPlanes()at those positions)
- Water vertex shader
- Water fragment shader
- Camera viewmatrix calculation
What am I doing wrong here? Notice the renderings of the framebuffer textures in the debug ui.
I was following this water rendering tutorial series here: Youtube Water rendering tutorial
There are other projects following this tutorial:
I couldn't find my error even after looking at the above code bases.
What might the error be? Anyone any ideas?