Skip to main content

RenderGraph3D

Struct RenderGraph3D 

Source
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.

Source

pub fn reset(&mut self)

Resets all declared resources and passes while retaining vector capacities for zero-allocation per-frame graph rebuilds.

Source

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.
Source

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.
Source

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.
Source

pub fn execute<F>( &mut self, schedule: &RenderGraphSchedule3D, run_pass: F, ) -> usize
where F: FnMut(RenderPassKind3D, &str) -> u64,

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 from compile.
  • F - Callback executing each pass and returning its duration in microseconds.
§Returns
  • usize - Total number of active passes executed.
Source

pub fn build_ue5_frame_graph( viewport_width: u32, viewport_height: u32, quality: &RenderQualityConfig, ) -> RenderGraph3D

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

Trait Implementations§

Source§

impl Clone for RenderGraph3D

Source§

fn clone(&self) -> RenderGraph3D

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RenderGraph3D

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for RenderGraph3D

Source§

fn default() -> RenderGraph3D

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.