- Home /
The question is answered, right answer was accepted
[SOLVED] Forward Rendering is messed up
Hi everyone! I've been facing an issue with rendering paths and I'm unable to figure out why it happens. I've already searched the forum, StackOverflow and Unity Answers with no luck, so I apologize if this problem was posted and solved before.
We have to do a project upgrade for a VR game we made a while ago. The upgrade is from Unity 4.7 to 2018.1, and it uses NewtonVR, NGUI, Photon Engine, etc. A vast amount of obsolete code.
After some weeks of work we've managed to play the game in the Editor, with minor navmesh issues, but when we build the project the render queue just gets obliterated and everything goes wild.
We've come to a situation we can't understand: as long as the rendering path is set to Deferred or Legacy Deferred, everything is displayed correctly. But when we change the rendering path to Forward, the skybox renders in front of everything with a render queue inferior to 2501, and the transparencies are messed up (we can see even through opaque materials).
The shaders are okay, and the render queue assigned to every material is correct (we've checked in Debug Mode this value is set to -1), and leaving apart NGUI there are no queue changes at runtime.
We think SteamVR forces the rendering path to be Forward when we compile the project, but found nothing in the code. Is there something we're missing here?
If we're forced to use forward rendering in VR, how can we fix this annoying amount of chaos?
EDIT: I solved it! A coworker explained to me how the rendering pipeline works and that helped me to understand the readings of the Frame Debugger.
Turns out NGUI was clearing too many times the graphic buffer and messing up all the rendering depth. We'll have to port the interface to the built-in UI system.