Custom Draw Order (i.e. Ignore Z-Depth)?
Hi,
Is it possible to draw objects to the screen in a custom order?
For example, in this test, I have 4 planes spread out in Z-Space, each with a material with a color and alpha applied. I would like the plane with the Circle to be drawn on top of the others - even though the Z-Depth would otherwise dictate it should be at the back?
Any suggestions?
Thanks,
Donovan
Hey Donovan,
Objects by default are set to
Auto
enabled. If you'd like to define the render order, simply disableAuto
and manually configure the object's render order as described in this guide.Cheers,
Kaitlyn
Thanks @Kaitlyn!
For those trying to figure it out:
1. Select your mesh (in this case "Circle")
2. Turn off Auto and set Order to 1.
> The circle will stop drawing to the screen.
I believe this is because it fails the depth test because the front place drawn in Pass/Order 0 is actually in front of it.
3. Select the Circle's material
4. In the Inspector, turn off Depth Test
> The circle will overwrite everything before it with no concern for Depth.