pub struct Renderer3D { /* private fields */ }Expand description
Zero-allocation UE5-class Deferred GGX PBR + Persistent Multi-Core SIMD BVH4/BVH8 + Nanite Hi-Z + Lumen GI + VSM + Clustered Lighting + TSR 3D renderer.
Implementations§
Source§impl Renderer3D
High-FPS UE5-class Deferred GGX PBR + Persistent Multi-Core Tiled SIMD BVH4/BVH8 + Lumen GI + Volumetric Fog + SIMD Bloom + Morphological AA/TAA renderer.
impl Renderer3D
High-FPS UE5-class Deferred GGX PBR + Persistent Multi-Core Tiled SIMD BVH4/BVH8 + Lumen GI + Volumetric Fog + SIMD Bloom + Morphological AA/TAA renderer.
Sourcepub fn sample_sky(dir: Vec3, sun: &DirectionalLight3D) -> Vec3
pub fn sample_sky(dir: Vec3, sun: &DirectionalLight3D) -> Vec3
Sourcepub fn attach_gpu_target(&mut self, handle: GpuTextureHandle, rect: Rect)
pub fn attach_gpu_target(&mut self, handle: GpuTextureHandle, rect: Rect)
Attaches a shared-device GPU 3D render target texture handle for zero-readback single-pass UI+3D compositing.
§Arguments
&Self- Mutable 3D renderer.GpuTextureHandle- Shared-device GPU texture backing the 3D render target.Rect- Viewport rectangle in logical UI pixels.
Sourcepub fn prepare_gpu_composite_descriptor(
&mut self,
frame_index: u64,
) -> Option<GpuCompositeDescriptor>
pub fn prepare_gpu_composite_descriptor( &mut self, frame_index: u64, ) -> Option<GpuCompositeDescriptor>
Prepares a GpuCompositeDescriptor referencing the attached shared-device GPU 3D render target for single-pass UI+3D compositing.
§Arguments
&Self- Mutable 3D renderer.u64- Monotonic compositor frame index.
§Returns
Option<GpuCompositeDescriptor>- Single-pass composite descriptor when a GPU target is attached.
Sourcepub fn invalidate_taa_history(&mut self)
pub fn invalidate_taa_history(&mut self)
Explicitly resets temporal anti-aliasing history on camera cuts or world teleports without touching unrelated HUD state.
§Arguments
&Self- Mutable 3D renderer.
Sourcepub fn can_reuse_cached_world(
&self,
world: &World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> bool
pub fn can_reuse_cached_world( &self, world: &World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> bool
Returns true when the cached 3D framebuffer can be reused across a HUD-only dirty frame without re-running 3D rasterization or starving TAA accumulation.
§Arguments
&Self- 3D renderer reference.&World3D- Active 3D world.u32- Viewport width in pixels.u32- Viewport height in pixels.&RenderQualityConfig- Active quality settings.
§Returns
bool-truewhen the cached 3D frame is valid and TAA accumulation does not require another sample.
Sourcepub fn render_world_or_reuse_cached(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> (&[u8], bool)
pub fn render_world_or_reuse_cached( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> (&[u8], bool)
Renders world into rgba_scratch only when 3D state changed or TAA needs another temporal sample, otherwise reusing the cached 3D buffer across HUD-only dirty updates.
§Arguments
&Self- Mutable 3D renderer.&mut World3D- Open-world 3D scene graph.u32- Target viewport width in logical pixels.u32- Target viewport height in logical pixels.&RenderQualityConfig- Runtime quality settings.
§Returns
(&[u8], bool)- Borrowed RGBA8 pixel slice andtrueif satisfied from cache without re-rasterization.
Sourcepub fn render_world_into_pool(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
pool: &RenderBufferPool,
fence_id: u64,
) -> Option<PooledFrameLease>
pub fn render_world_into_pool( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, pool: &RenderBufferPool, fence_id: u64, ) -> Option<PooledFrameLease>
Renders world directly into a bounded zero-allocation RenderBufferPool slot tagged with fence_id.
§Arguments
&Self- Mutable 3D renderer.&mut World3D- Open-world 3D scene graph.u32- Target viewport width in logical pixels.u32- Target viewport height in logical pixels.&RenderQualityConfig- Runtime quality settings.&RenderBufferPool- Bounded CPU output buffer pool.u64- Submission fence value guarding reclamation.
§Returns
Option<PooledFrameLease>- Populated pooled RGBA8 lease, orNoneif all bounded pool slots are in flight.
Sourcepub fn render_world_interpolated_into_pool(
&mut self,
world: &mut World3D,
snapshots: &DoubleBufferedSnapshot<World3DSnapshot>,
alpha: f32,
viewport: (u32, u32),
quality: &RenderQualityConfig,
target_pool: (&RenderBufferPool, u64),
) -> Option<PooledFrameLease>
pub fn render_world_interpolated_into_pool( &mut self, world: &mut World3D, snapshots: &DoubleBufferedSnapshot<World3DSnapshot>, alpha: f32, viewport: (u32, u32), quality: &RenderQualityConfig, target_pool: (&RenderBufferPool, u64), ) -> Option<PooledFrameLease>
Renders world using a discontinuity-safe interpolated World3DSnapshot sampled at alpha with object-space inverse-interpolated dynamic RT (zero dynamic_bvh rebuilds per VSync).
§Arguments
&Self- Mutable 3D renderer.&mut World3D- 3D world holding shared mesh library, lighting, and BVH acceleration structures.&DoubleBufferedSnapshot<World3DSnapshot>- Immutable(prev_state, curr_state)snapshot buffer.f32- Normalized interpolation alpha in[0.0, 1.0].(u32, u32)- Target viewport(width, height)in logical pixels.&RenderQualityConfig- Runtime quality settings.(&RenderBufferPool, u64)- Bounded CPU output buffer pool and submission fence value.
§Returns
Option<PooledFrameLease>- Rendered interpolated frame lease, orNoneunder pool backpressure.
Sourcepub fn render_world(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> ImageBuffer
pub fn render_world( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> ImageBuffer
Renders world at runtime-configured quality into an ImageBuffer without zero-filling output memory.
§Arguments
&Self- Mutable 3D renderer.&mut World3D- Open-world 3D scene graph.u32- Target viewport width in logical pixels.u32- Target viewport height in logical pixels.&RenderQualityConfig- Live runtime quality, resolution scale, LOD, and ray-tracing settings.
§Returns
ImageBuffer- Ready RGBA8 rendered 3D frame for immediate presentation.
Sourcepub fn render_world_rgba(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> &[u8] ⓘ
pub fn render_world_rgba( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> &[u8] ⓘ
Renders world into the persistent internal rgba_scratch buffer, eliminating per-frame output heap allocations.
§Arguments
&Self- Mutable 3D renderer.&mut World3D- Open-world 3D scene graph.u32- Target viewport width in logical pixels.u32- Target viewport height in logical pixels.&RenderQualityConfig- Live runtime quality, resolution scale, LOD, and ray-tracing settings.
§Returns
&[u8]- Borrowed RGBA8 pixel slice of the rendered 3D frame.
Sourcepub fn render_world_tsr_into_vec(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
out_pixels: &mut Vec<u8>,
) -> (u32, u32)
pub fn render_world_tsr_into_vec( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, out_pixels: &mut Vec<u8>, ) -> (u32, u32)
Renders world at sub-native resolution and reconstructs a sharp native (viewport_w, viewport_h) frame via UE5 Temporal Super Resolution (TSR).
§Arguments
&mut World3D- Open-world 3D scene graph.u32- Target native output width in pixels.u32- Target native output height in pixels.&RenderQualityConfig- Runtime quality settings supplying internalresolution_scale.&mut Vec<u8>- Reusable full-resolution destination RGBA8 buffer.
§Returns
(u32, u32)- Actual reconstructed output dimensions(dst_w, dst_h).
Sourcepub fn render_world_tsr(
&mut self,
world: &mut World3D,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> ImageBuffer
pub fn render_world_tsr( &mut self, world: &mut World3D, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> ImageBuffer
Renders world using UE5 Temporal Super Resolution (TSR) upscaling and returns a full-resolution ImageBuffer.
§Arguments
&mut World3D- Open-world 3D scene graph.u32- Target native output width in pixels.u32- Target native output height in pixels.&RenderQualityConfig- Runtime quality settings supplying internal scale and RT/Lumen toggles.
§Returns
ImageBuffer- Reconstructed native-resolution RGBA8 frame.
Sourcepub fn render_world_tsr_into_pool(
&mut self,
world: &mut World3D,
viewport: (u32, u32),
quality: &RenderQualityConfig,
target_pool: (&RenderBufferPool, u64),
) -> Option<PooledFrameLease>
pub fn render_world_tsr_into_pool( &mut self, world: &mut World3D, viewport: (u32, u32), quality: &RenderQualityConfig, target_pool: (&RenderBufferPool, u64), ) -> Option<PooledFrameLease>
Renders world at sub-native resolution and writes the TSR-reconstructed native frame directly into a bounded zero-allocation RenderBufferPool slot.
§Arguments
&mut World3D- Open-world 3D scene graph.(u32, u32)- Target native output(viewport_w, viewport_h)in pixels.&RenderQualityConfig- Runtime quality configuration controlling internal TSR scale.(&RenderBufferPool, u64)- Bounded output frame pool and fence value.
§Returns
Option<PooledFrameLease>- Populated native-resolution TSR frame lease, orNoneunder pool backpressure.
Sourcepub fn apply_frame_pacing_feedback(
&mut self,
frame_ms: f32,
quality: &mut RenderQualityConfig,
) -> FramePacingTelemetry3D
pub fn apply_frame_pacing_feedback( &mut self, frame_ms: f32, quality: &mut RenderQualityConfig, ) -> FramePacingTelemetry3D
Feeds measured frame_ms into the damped PI AdaptiveFrameGovernor and applies smooth DRS scale, LOD bias, and RT probe stride adjustments to quality without FPS oscillation.
§Arguments
f32- Measured render duration of the most recent frame in milliseconds.&mut RenderQualityConfig- Mutable runtime quality settings updated whendynamic_resolutionis enabled.
§Returns
FramePacingTelemetry3D- Updated smoothed frame-time and stability telemetry.
Sourcepub fn compile_frame_graph(
&mut self,
viewport_w: u32,
viewport_h: u32,
quality: &RenderQualityConfig,
) -> RenderGraphSchedule3D
pub fn compile_frame_graph( &mut self, viewport_w: u32, viewport_h: u32, quality: &RenderQualityConfig, ) -> RenderGraphSchedule3D
Builds and compiles the UE5 Render Dependency Graph (RDG) for (viewport_w, viewport_h) and quality, reporting dead-pass culling and transient memory aliasing savings.
§Arguments
u32- Target viewport width in pixels.u32- Target viewport height in pixels.&RenderQualityConfig- Active quality configuration controlling RT, Lumen, VSM, and TSR passes.
§Returns
RenderGraphSchedule3D- Compiled pass schedule with transient memory aliasing telemetry.
Source§impl Renderer3D
impl Renderer3D
pub fn get_color_buffer(&self) -> &Vec<u8> ⓘ
pub fn get_mut_color_buffer(&mut self) -> &mut Vec<u8> ⓘ
pub fn set_color_buffer(&mut self, val: Vec<u8>) -> &mut Self
pub fn get_aa_buffer(&self) -> &Vec<u8> ⓘ
pub fn get_mut_aa_buffer(&mut self) -> &mut Vec<u8> ⓘ
pub fn set_aa_buffer(&mut self, val: Vec<u8>) -> &mut Self
pub fn get_depth_buffer(&self) -> &Vec<f32>
pub fn get_mut_depth_buffer(&mut self) -> &mut Vec<f32>
pub fn set_depth_buffer(&mut self, val: Vec<f32>) -> &mut Self
pub fn get_last_executed_rdg_passes(&self) -> usize
pub fn get_mut_last_executed_rdg_passes(&mut self) -> &mut usize
pub fn set_last_executed_rdg_passes(&mut self, val: usize) -> &mut Self
pub fn get_frame_governor(&self) -> &AdaptiveFrameGovernor
pub fn get_mut_frame_governor(&mut self) -> &mut AdaptiveFrameGovernor
pub fn set_frame_governor(&mut self, val: AdaptiveFrameGovernor) -> &mut Self
pub fn get_render_graph(&self) -> &RenderGraph3D
pub fn get_mut_render_graph(&mut self) -> &mut RenderGraph3D
pub fn set_render_graph(&mut self, val: RenderGraph3D) -> &mut Self
pub fn get_rt_stride_bias(&self) -> usize
pub fn get_mut_rt_stride_bias(&mut self) -> &mut usize
pub fn set_rt_stride_bias(&mut self, val: usize) -> &mut Self
pub fn get_adapted_exposure(&self) -> f32
pub fn get_mut_adapted_exposure(&mut self) -> &mut f32
pub fn set_adapted_exposure(&mut self, val: f32) -> &mut Self
pub fn get_last_world_revision(&self) -> u64
pub fn get_mut_last_world_revision(&mut self) -> &mut u64
pub fn set_last_world_revision(&mut self, val: u64) -> &mut Self
pub fn get_taa_accumulated_frames(&self) -> u32
pub fn get_mut_taa_accumulated_frames(&mut self) -> &mut u32
pub fn set_taa_accumulated_frames(&mut self, val: u32) -> &mut Self
pub fn get_cached_world_reuses(&self) -> u64
pub fn get_mut_cached_world_reuses(&mut self) -> &mut u64
pub fn set_cached_world_reuses(&mut self, val: u64) -> &mut Self
pub fn get_width(&self) -> u32
pub fn get_mut_width(&mut self) -> &mut u32
pub fn set_width(&mut self, val: u32) -> &mut Self
pub fn get_height(&self) -> u32
pub fn get_mut_height(&mut self) -> &mut u32
pub fn set_height(&mut self, val: u32) -> &mut Self
pub fn get_last_stats(&self) -> RenderStats3D
pub fn get_mut_last_stats(&mut self) -> &mut RenderStats3D
pub fn set_last_stats(&mut self, val: RenderStats3D) -> &mut Self
Trait Implementations§
Source§impl Clone for Renderer3D
impl Clone for Renderer3D
Source§impl Debug for Renderer3D
impl Debug for Renderer3D
Source§impl Default for Renderer3D
Default zero-allocation UE5-class Renderer3D with identity motion-vector matrices and pre-allocated subsystems.
impl Default for Renderer3D
Default zero-allocation UE5-class Renderer3D with identity motion-vector matrices and pre-allocated subsystems.