- Home /
New UI in V4.6 - rendering error using masks in deferred rendering.
For my project I'm using Unity 4.6 new UI system. I'm drawing my canvas in World Space mode and seem to be having a depth buffer render problem.
So this is the setup I have: Just a Canvas with a UI.Image object that has a nested UI.Text (this is the image object)
And if there is ANY geometry behind the text then it wont render it:
This only seems to happen in deferred rendering. If I switch to forward rendering then the text shows up correctly. Is this the normal behaviour? Am I doing something wrong? Are there any workarounds?
Anyone? I could really use some help with this. Any hint on what might help would be very welcome!
Sorry for the spam but ANY kind of help would be great. I'm currently getting by by changing the lighting to vertex lighting on the UI camera but would like to know what the right way to deal with this problem is.
$$anonymous$$y game is 3d so every time I want to test the ui I change the main camera rendering technique to forward rendering.... I'm sure there is something going on... I mean the unity tutorial videos are using deferred rendering!
We are also experiencing this error, has anyone found a solution to this problem?
Answer by PaulKirsten · Jul 23, 2015 at 09:50 AM
If someone is still interested in solving this issue: UnityIssueTracker-MaskingUIWorldSpace
The problem with mask and deffered rendering should be fixed in Unity 5.2, but for all lower versions you can clear the stencil buffer of the camera: Camera.clearStencilAfterLightingPass