Skip to content

GeometryPass

GeometryPass is the primary rasterization pass. It iterates all mesh entities, resolves their materials and shaders, and issues draw calls into the scene_color framebuffer. It reads the shadow map produced by ShadowPass to evaluate shadow visibility.

Render Graph Role

AttributeValue
GroupGeometry
Readsshadow_map
Writesscene_color
CullableYes

What It Draws

GeometryPass collects entities that have all three of:

  • MeshComponent - model handle
  • ResourceComponent - shader handle
  • MaterialComponent - surface parameters

It skips entities with any component missing or with a resource in a non-Ready load state.

Per-Draw Uniforms

For each entity, the pass uploads:

UniformSource
u_modelTransformComponent world matrix
u_viewActive camera view matrix
u_projectionActive camera projection matrix
u_light_space_matrixLogical buffer from ShadowPass
u_shadow_mapshadow_map depth attachment
Material uniformsMaterialComponent properties and texture slots

Ordering Relative to SkyboxPass

GeometryPass and SkyboxPass both write to scene_color. The render graph infers no dependency between them - their relative order is fixed by declaration order in the render graph builder (geometry before skybox), ensuring the skybox is drawn after opaque geometry and depth-tested correctly.