- Home /
Clear depth buffer between two layers
I am trying to draw a layer, clear the z-buffer and then draw the other layers. But I don't seem to have the access in Unity to call the camera's functions in between drawing.
I want to do this, because I want to draw the sky and then clear my depth buffer again, because I know that the work is done in the background.
Is there a way to access the camera in between layer calls with only one camera? I know the use of double cameras and changing the clear flags, but it distorts a lot of example projects like water4 since it calls Camera.main
. Since I have more than one camera, there is no real Camera.main
anymore.
Your answer
Follow this Question
Related Questions
Combining multiple layers and water 0 Answers
Culling Mask with Depth Occlusion 1 Answer
uGUI culling layers alternative 0 Answers
Pixel Perfect Camera not clearing screen that is cropped? 0 Answers
Setting a layer to a gameObject dynamically doesn't work 0 Answers