Frame pipeline

Every pass SceneRenderer records in a frame, in order, with what each one reads, writes and replaces.

Last updated Oct 26, 2026Edit this pageVersion 1.0.0

SceneRenderer is a deferred renderer. Opaque geometry writes a G-Buffer, lighting runs once per pixel over it, translucent surfaces are drawn forward afterward, and post-processing finishes the frame. It records a whole frame in SceneRenderer::RenderFrame, after the host has called BeginScene, submitted its draws and called EndScene. This page walks through that function in the order the passes run. Use it to find where an effect happens, what it depends on, and what replaces it on another tier.

Some passes also need their project switch (Project Settings > Rendering > Features, all off for a new project): the GI volumes, SDF build, probe and screen-probe gather, SDF reflections and GI composite need Global Illumination; the ray scene, RT sun shadow and the path trace need Ray Tracing; the MegaLights passes need MegaLights; the raymarched clouds and cloud shadow need Volumetric Clouds; the froxel fog needs Volumetric Fog. With a switch off its passes are not recorded and their targets are never allocated, whatever the tier.

Where the frame sits in the engine loop

Every host runs the same loop: Renderer::BeginFrame, then the host's Tick (which records scene rendering into the frame's command buffer), then Draw for the UI, then the swapchain pass that presents. Nothing renders after the swapchain pass ().

Overview

  1. GI volumes
  2. Shadows
  3. Cluster cull
  4. Sky + probes
  5. G-Buffer
  6. Velocity
  7. VSM
  8. Decals
  9. AO
  10. Hi-Z
  11. RT sun / MegaLights
  12. Lighting
  13. GI composite
  14. Sky + clouds
  15. SSR
  16. Fog
  17. Translucency
  18. Post
  19. Overlays
The deferred frame. Lighting is the pivot: everything before it fills inputs, everything after it composites onto the lit HDR image.

Three facts shape the order:

  • The Global Illumination volume builds and the shadow passes come first, because lighting samples both.
  • Reflections are traced before translucency, so glass and particles composite over the resolved reflections instead of appearing inside them.
  • Temporal upscalers resolve before tonemapping, on the linear HDR image. Built-in TAA and the spatial upscaler run after it.

The six render-pass extension points are marked in the tables below.

1. Before geometry

StageWhat it does
Ray sceneWhen any ray-traced consumer is active, the bottom-level structures and the per-frame top-level structure are built or refitted. See Ray tracing.
SDF buildBuilds the world signed distance field that Global Illumination, SDF reflections and SDF far shadows trace.
GI cascades and probesUpdates the radiance cascades and traces the irradiance probes. These can run on the async-compute queue.
ShadowRenders the sun's cascaded shadow map, then the local shadow atlas for spot, point and rect lights.
Light functionsRenders light-function tiles before anything reads a light.
Cluster cullBuilds the froxel grid and culls local lights into per-cluster lists. Clustered lighting is on at every tier.
Sky and capturesUpdates the sky atmosphere and sky-light capture, then planar reflections and one stale reflection-probe capture. A mirror is a second view of the same frame, so these run before the G-Buffer.
Cloud shadowBuilds the sun-space cloud transmittance map (raymarched clouds, High and up).

2. Geometry

StageWhat it does
G-BufferDraws opaque geometry into four color targets plus depth, after an optional depth prepass (High and up). The projection is jittered when a temporal resolve consumes the jitter. At Epic and Cinematic, eligible meshes use the meshlet (mesh-shader) path where the GPU supports it.
AfterGBufferExtension point.
Custom depthDraws only meshes that opted in, into a depth plus 8-bit stencil pair that post-process materials can read.
VelocityWrites motion vectors for moving objects whenever a temporal resolve or a per-effect temporal filter needs them.
VSMVirtual shadow maps: page marking, page raster and resolve. Epic and up.
DecalsBox-projected deferred decals, written over the G-Buffer before AO and lighting read it.
GTAOGround-truth AO. Writes the AO term and a bent normal, the average unoccluded direction, which the Global Illumination composite uses for cone occlusion. Ray-traced AO fills this slot when r.RTAO is active. Off at Low.
Capsule shadowsSoft shadows from skinned meshes that have capsule shadows turned on (r.CapsuleShadows).
Hi-ZBuilds the depth pyramid that the next frame's occlusion cull reads.

G-Buffer layout

TargetFormatContents
ARGBA8Albedo, metallic
BRGBA16FWorld normal, roughness
CRGBA16FEmissive, material AO
DExtended packClear coat, anisotropy, light channels and the shading-model code
DepthD32FScene depth

3. Lighting

  1. RT sun shadow
  2. MegaLights
  3. Deferred lighting
  4. MegaLights composite
  5. Probe and screen-probe gather
  6. SDF reflections
  7. GI denoise + composite
  8. SSGI
  9. Local exposure
  10. SSS
The lighting block. Stages that are off at the current tier are skipped.
  • BeforeLighting extension point runs first.
  • Ray-traced sun shadow cone-samples the sun disc through the scene's acceleration structure before lighting reads it. See Shadows.
  • MegaLights shades the shadow-casting local lights that missed the atlas budget, stochastically. The deferred pass skips those lights so nothing counts twice.
  • Deferred lighting resolves direct light for every G-Buffer pixel: sun, clustered local lights, area lights, sky lighting and contact shadows. See Lights.
  • Global Illumination gathers indirect diffuse, traces SDF reflections, denoises and composites onto the HDR image. The composite weights the indirect light by the non-metal part of the albedo, so metals take no diffuse fill. See Global Illumination.
  • SSGI is a screen-space one-bounce term. No tier enables it; r.SSGI 1 forces it.
  • SSS blurs diffuse light on subsurface pixels once direct and indirect light are both in the HDR target.
  • AfterLighting extension point.

4. Sky, reflections and translucency

StageWhat it does
Skybox and cloudsDraws the cubemap or procedural atmosphere behind opaque geometry, then the cloud layer.
Atmosphere compositeAerial perspective and height fog over everything opaque.
Virtual textureThe virtual-textured ground surface, when enabled. See Virtual texturing.
SSRScreen-space reflections: trace, temporal filter and resolve. A ray that leaves the screen can continue into the SDF or, with r.RTReflections, into the ray-tracing scene.
Volumetric fogFroxel fog, after SSR so reflections see unfogged surfaces. Epic and up.
VDB volumesSparse volumes such as smoke and clouds from VDB files.
BeforeTranslucencyExtension point.
TransparentForward-shaded translucent surfaces, sorted back to front, plus water.
ParticlesCPU and GPU particles and ribbons.
World widgetsWorld-space UI quads, depth-tested against opaque geometry.
Selection maskEditor only: the selected and hovered meshes into a mask for the outline.

5. Post-processing

  1. DoF
  2. Motion blur
  3. Auto-exposure
  4. Bloom
  5. Temporal upscale
  6. Tonemap + grading
  7. Post-process material
  8. TAA
  9. Lens flare
  10. Spatial upscale
  11. FXAA / CAS / Final
  12. Point clouds
  13. Grid + debug draw
  14. Selection outline
The post chain. A temporal upscaler (TSR, FSR, DLSS, XeSS, MetalFX) resolves before the tonemap; built-in TAA runs after it.
  • Depth of field, motion blur, auto-exposure and bloom run on the HDR image. Auto-exposure runs before bloom, because the bloom threshold works on exposed luminance.
  • Temporal upscale consumes the linear HDR scene after depth of field and motion blur. After it, the rest of the chain runs at output resolution.
  • Tonemap applies the operator and the grading chain.
  • AfterTonemap extension point.
  • Post-process material is a PostProcess-domain material evaluated as a fullscreen pass.
  • TAA runs only when no temporal upscaler is active. It resolves the tonemapped image before lens flare and editor overlays, so they never enter its history.
  • Spatial upscale (FSR1) is the only resolve after tonemapping.
  • Final runs FXAA when no temporal resolve ran, or contrast-adaptive sharpening, or a plain copy.
  • Overlays draw last on the presentable target: point clouds, then the grid and debug lines, then the selection outline. They stay out of the temporal history, the upscaler and the exposure histogram.
  • BeforeUI extension point.

See Post-processing and volumes and Upscaling and anti-aliasing.

Debug and reference stages

These replace the presented image and are not part of a normal frame:

  • Path trace: the progressive reference renderer. See Ray tracing.
  • SDF debug: a sphere-traced view of the distance field.
  • Buffer visualization: G-Buffer channels, velocity, Global Illumination, reflections and other intermediate targets.

See Debug views.

Render graph

Every pass runs through the RHI's. Each pass declares its reads and writes, and the graph orders the passes and emits the state transitions. The geometry, lighting and post passes share one frame graph, so transient targets with disjoint lifetimes can share memory.

Note

The scene renderer does not turn on the graph's dead-pass culling: every pass it adds runs.

API reference

Engine sources

This page describes behavior implemented in these files of the engine repository, checked against commit aee5cfcae.

  • Engine/Source/Runtime/SceneRenderer/Public/Renderer/SceneRenderer.h
  • Engine/Source/Runtime/SceneRenderer/Public/Renderer/RenderPassExtension.h
  • Engine/Source/Runtime/RHI/Public/RHI/RenderGraph.h
  • Engine/Source/Runtime/RHI/Public/RHI/ProjectRenderFeatures.h

Page feedback

Was this page helpful?