pub struct RenderGraph3D { /* private fields */ }Expand description
UE5 Render Dependency Graph (RDG) managing declarative pass scheduling, automatic dead-pass culling, and transient buffer aliasing.
Implementations§
Source§impl RenderGraph3D
Declarative UE5 Render Dependency Graph building, dead-pass culling, topological sorting, and transient memory aliasing for RenderGraph3D.
impl RenderGraph3D
Declarative UE5 Render Dependency Graph building, dead-pass culling, topological sorting, and transient memory aliasing for RenderGraph3D.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets all declared resources and passes while retaining vector capacities for zero-allocation per-frame graph rebuilds.
Sourcepub fn declare_resource(
&mut self,
name: &str,
size_bytes: usize,
is_external_output: bool,
) -> usize
pub fn declare_resource( &mut self, name: &str, size_bytes: usize, is_external_output: bool, ) -> usize
Declares a transient render-target or buffer resource inside this render graph and returns its resource_id.
§Arguments
&str- Human-readable resource label.usize- Memory footprint in bytes.bool- Whether this resource is an external swapchain/output anchor.
§Returns
usize- Assigned resource identifier.
Sourcepub fn add_pass(
&mut self,
kind: RenderPassKind3D,
name: &str,
reads: &[usize],
writes: &[usize],
) -> usize
pub fn add_pass( &mut self, kind: RenderPassKind3D, name: &str, reads: &[usize], writes: &[usize], ) -> usize
Declares a render pass with explicit reads and writes resource dependencies and returns its pass_id.
§Arguments
RenderPassKind3D- Pass category.&str- Diagnostic pass name.&[usize]- Resource IDs read by this pass.&[usize]- Resource IDs written by this pass.
§Returns
usize- Assigned pass identifier.
Sourcepub fn compile(&self) -> RenderGraphSchedule3D
pub fn compile(&self) -> RenderGraphSchedule3D
Compiles this render graph by performing backward liveness dead-pass culling from external outputs, topological pass ordering, and greedy transient memory aliasing.
§Returns
RenderGraphSchedule3D- Compiled pass execution schedule and aliased VRAM footprint.
Sourcepub fn build_ue5_frame_graph(
viewport_width: u32,
viewport_height: u32,
quality: &RenderQualityConfig,
) -> Self
pub fn build_ue5_frame_graph( viewport_width: u32, viewport_height: u32, quality: &RenderQualityConfig, ) -> Self
Builds the canonical UE5-aligned 3D frame graph (VSM -> Hi-Z -> Nanite -> G-Buffer PBR -> Clustered Lights -> Lumen GI -> Niagara -> TSR -> Bloom -> Present) for a viewport size and quality config.
§Arguments
u32- Output viewport width in pixels.u32- Output viewport height in pixels.&RenderQualityConfig- Active graphics quality settings toggling RT, TSR, and bloom passes.
§Returns
Self- Populated UE5 render dependency graph ready for compilation.