pub struct Renderer3D { /* private fields */ }Expand description
Zero-allocation UE5-class Deferred GGX PBR + Persistent Multi-Core SAH BVH + Lumen GI + Bloom + Morphological AA/TAA 3D renderer.
Implementations§
Source§impl Renderer3D
High-FPS UE5-class Deferred GGX PBR + Persistent Multi-Core 32B SAH BVH + Lumen GI + Volumetric Fog + Bilinear Bloom + Geometry-Aware Morphological AA/TAA renderer.
impl Renderer3D
High-FPS UE5-class Deferred GGX PBR + Persistent Multi-Core 32B SAH BVH + Lumen GI + Volumetric Fog + Bilinear Bloom + Geometry-Aware Morphological AA/TAA renderer.
Sourcepub fn sample_sky(dir: Vec3, sun: &DirectionalLight3D) -> Vec3
pub fn sample_sky(dir: Vec3, sun: &DirectionalLight3D) -> Vec3
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 without mutating authoritative simulation transforms.
§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.