It’s me again having some problems…
The water simulation I’m working on uses multiple maps generated at different stages. At one stage, the reflection-stage, the shader mirrors the viewProjMat at the water-plane to accieve the “look from below” needed for reflection. This works quite fine and is very cheap depending on computational time in comparison to using a second camera, which would cost double of the draw calls mentioned in an older thread of mine.
The problem is, if the camera looks more and more to the ground, the original camera can’t “see” the trees and their leaves anymore, so the frustum culling correctly culls them away. But in the reflection you should still “see” the trees and their leaves. To illustrate my problem, I’ve added three screenshots in a row, where the camera looks more and more to the ground. Left is the final image, right is the reflection-map generated in the reflection-stage.
I’ve thought about two solutions for my problem:
- Stretching the culling frustum at y-axis to prevent the trees from culling
- Increase the size of the AABB of the trees to the bottom to keep the AABB still in frustum
Searching the forum, the api and the code I found no function to implement one of my solutions mentioned before. So has anyone an idea or propose me how the problem could be fixed?