The Default Pipeline
The default render graph is what the engine constructs when the game does not override configure_render_graph(). This chapter is the inventory: the pass list, the order they end up in after topological sort, and the data flow between them.
Pass Execution Order
The graph sorts these passes from their declared read and write dependencies. The order below is the one that comes out the other side for a typical configuration.
1. ClearPass - Clear scene_color and depth
2. ShadowDepthPass - Render cascaded shadow maps + spotlight shadows
3. SkyPass - Render procedural atmosphere to scene_color
4. ScenePass - Render scene objects (simple path) to scene_color
5. MeshPass - Render PBR meshes with shadows and lighting
6. SkinnedMeshPass - Render animated skeletal meshes
7. GrassPass - Render GPU-instanced grass
8. GridPass - Render infinite ground grid
9. LinesPass - Render debug lines
10. SelectionMaskPass - Generate selection mask for editor
11. OutlinePass - Render selection outline
--- User passes (from configure_render_graph) ---
12. BloomPass - HDR bloom (default)
13. PostProcessPass - Tonemapping and compositing (default)
14. BlitPass - Copy to swapchain (default)
Data Flow Diagram
shadow_depth
ShadowDepthPass --> spotlight_shadow_atlas
|
v
SkyPass ----------> scene_color <-- ClearPass
|
MeshPass ----------> scene_color, depth, entity_id, view_normals
|
SkinnedMeshPass --> scene_color, depth
|
GrassPass --------> scene_color, depth
GridPass ---------> scene_color, depth
LinesPass --------> scene_color, depth
|
v
BloomPass --------> bloom (half-res)
|
PostProcessPass --> compute_output
reads: scene_color, bloom, ssao
|
BlitPass ---------> swapchain
Core Passes (Always Present)
These passes are added by the engine during renderer initialization. They cannot be removed. They can be disabled at runtime.
ClearPass
Clears scene_color to black and depth to 0.0. Reversed-Z is the convention everywhere in the renderer, so 0.0 is the far plane.
SkyPass
Renders the procedural atmosphere or a solid background. Controlled by world.resources.graphics.atmosphere.
ScenePass
A simpler scene path for basic objects, kept around alongside the PBR mesh pass.
ShadowDepthPass
Renders the shadow map. The depth target is shadow_depth (cascaded sun shadows) plus spotlight_shadow_atlas (per-spotlight shadows packed into one atlas). See Shadow Mapping.
MeshPass
The main PBR mesh pass. Multi-target output: scene_color for HDR shaded color, depth for depth, entity_id for GPU picking, and view_normals for SSAO and SSR. One fragment invocation writes to all four. See Geometry Passes.
SkinnedMeshPass
The same idea as MeshPass but with GPU skinning for animated skeletal meshes.
Selection Passes
SelectionMaskPass writes a mask of selected entities into selection_mask. OutlinePass reads the mask and renders the outline.
User-Configurable Passes (Default)
These three are what the default configure_render_graph() adds. Override the method to replace them.
BloomPass
Reads scene_color, writes a half-resolution bloom texture.
PostProcessPass
Reads scene_color, bloom, and ssao. Performs tonemapping and compositing. Writes to compute_output.
BlitPass
Copies compute_output to swapchain for presentation.
Adding SSAO/SSGI/SSR
The default pipeline only ships bloom and tonemapping. SSAO, SSGI, and SSR are not in the default graph because they cost real GPU time and not every game wants them. To enable any of them, override configure_render_graph() and add the relevant passes. See Post-Processing for the full list of available post-process passes, and Custom Passes for the wiring.