Hello everyone,
I’ve searched for hours for a solution, I really hope some shader-cultured programmer can help me!
I have 2 cameras :
- Main camera with most layers, basically the playable world. Clear flags = Skybox, Depth = -1
- One rendering ONLY the Lucid layer (black cube in 2nd screenshot), which has to render on top of everyhting so Clear flags = Only Depth, Depth = 20
The problem is that on Camera 1, all the UI canvases in World Space in my Default layer are getting cleared by the second camera! I guess the problem lies in the UI default shaders. Even if I make the 2nd camera as Don’t Clear, it clears out all UIs…
I thought about editing the Default UI shader and play with rendering Queue, clear flags in the code, but I can’t even find where it is or how to edit it.
What might help is that on the 2nd Camera, there is 4 Command buffer, and removing “BeforeImageEffects: Post-Processing” puts back the UIs, but makes the wanted object disappear…
Here are two screenshots demonstrating the problem :
First image shows only the Main Camera, with all the world space canvas UI’s showing correctly.
Second one is with the black cube on the Lucid layer, in Camera 2 : all canvases disappear…
I’d be very grateful if you could help me out !
Cheers