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, transient memory aliasing, and active pass execution for RenderGraph3D.
impl RenderGraph3D
Declarative UE5 Render Dependency Graph building, dead-pass culling, topological sorting, transient memory aliasing, and active pass execution 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 execute<F>(
&mut self,
schedule: &RenderGraphSchedule3D,
run_pass: F,
) -> usize
pub fn execute<F>( &mut self, schedule: &RenderGraphSchedule3D, run_pass: F, ) -> usize
Executes every surviving pass in schedule in topological order by invoking run_pass with (kind, name), recording zero-allocation pass execution.
§Arguments
&Self- Mutable render graph.&RenderGraphSchedule3D- Compiled pass schedule fromcompile.F- Callback executing each pass and returning its duration in microseconds.
§Returns
usize- Total number of active passes executed.
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/Blender 3D frame graph (ComputeMorphSkin -> 4-Cascade CSM -> Hi-Z -> Nanite -> G-Buffer Principled PBR -> Clustered Lights -> Lumen GI -> Transmission -> 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.
Source§impl RenderGraph3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl RenderGraph3D
Implements impl #impl_generics #name #ty_generics #where_clause.