See all glossary termsEach rendered frame is composed of multiple layers of graphics. The order in which these layers are drawn is called the draw order. The draw order is important because it determines which graphics are drawn on top of others.
In Godot, the draw order is determined:
- in 2D: the order in which nodes are added to the scene tree. Nodes that are added later are drawn on top of nodes that are added earlier. However, other parameters can change this draw order. For example, he
z_index
property can change the draw order of that item. Using masks to clip parts of an image will also change the draw order.
- in 3D: proximity to the camera. Objects that are closer to the camera are drawn on top of objects that are further away. Multiple parameters can change this draw order, such as the
render_priority
property.
3D is more complicated than 2D because additionally to draw order, there are also rendering passes. These are different stages of rendering that can be used to apply different effects to the scene. For example, a scene can be rendered with a depth pass to create a depth map, which can be used to create effects like fog or depth of field. school.gdquest.com - 0.3.5-2024-12-12T18:17:18.104Z-a38dc74be3238fd1ea161f4df67b95520741da9d-release