beyond-all-reason / beyond-all-reason/RecoilEngine
Water reflections break down at very low angles
- Dominant language
- C++
- Stars
- 683
- Forks
- 293
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
In the image you can see reflections that should be behind the object.
I think it would be possible to save a depth buffer from the reflection render pass/fbo and with some transformations compare that to the depth buffer of the scene when the water renderers do their main pass since they are after the main scene and reflection passes. Could be wrong. Need to think about the maths more(and how you could pack the data). Probably not efficient, after all we are working with rasterization hacks.
It might not be worth it if it is possible but it might be a good optional setting.
Part of this is because the water plane that is rendered with the basic water renderers(at least with bump water) changes height(hacks to simulate waves) while the reflection plane does not. The unit animations changing their own heights(bobbing) might also contribute but I don't think so.
Contributor guide
Research direction
Start by locating the water renderers, the reflection render pass/FBO, and the main scene pass, then reproduce the artifact at very low viewing angles. Compare how the basic and bump water renderers handle the water plane and reflection plane, including unit height changes. Done means reflections no longer appear behind objects in the reported low-angle cases without an unacceptable performance cost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100