What is the rendering/draw order of objects (ignoring render queue)

Question:
What is the default rendering order of the objects in the scene (when render queue is the same for all the objects). Does Unity follow Painter’s algorithm in which objects at the farthest distance from camera are rendered first or Unity renders objects closest to the camera first?

What I tried:
I tested rendering order of few objects in the scene using scene debugger and the draw order for opaque objects was unpredictable. Some times one object rendered first and some time other but for the transparent objects it was always farthest to closest.

Hi!
Transparent objects are always sorted back-to-front. Opaques are sorted roughly front-to-back, but there are other factors that try, for example, to improve batching.

1 Like