pub struct RaytraceSession { /* private fields */ }Expand description
Zero-steady-state-allocation reusable ray-tracing session owning persistent HDR accumulation, G-buffers, SVGF denoiser, and tone-mapped RGBA8 output.
Implementations§
Source§impl RaytraceSession
Zero-steady-state-allocation progressive rendering, resizing, and framebuffer access for RaytraceSession.
impl RaytraceSession
Zero-steady-state-allocation progressive rendering, resizing, and framebuffer access for RaytraceSession.
Sourcepub fn new(config: RaytraceConfig) -> Self
pub fn new(config: RaytraceConfig) -> Self
Sourcepub fn resize(&mut self, width: u32, height: u32)
pub fn resize(&mut self, width: u32, height: u32)
Resizes all persistent session buffers and resets progressive accumulation.
§Arguments
&Self- Mutable session reference.u32- New viewport width in pixels.u32- New viewport height in pixels.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets progressive accumulation, G-buffers, tile progress, and ray telemetry in place with zero heap allocation.
§Arguments
&Self- Mutable session reference.
Sourcepub fn set_integrator(&mut self, mode: RtIntegratorMode)
pub fn set_integrator(&mut self, mode: RtIntegratorMode)
Switches the active integrator mode and resets temporal accumulation in place.
§Arguments
&Self- Mutable session reference.RtIntegratorMode- New integrator mode.
Sourcepub fn render_progressive_step(
&mut self,
scene: &RaytraceScene,
budget_rays: u64,
) -> RaytraceStats
pub fn render_progressive_step( &mut self, scene: &RaytraceScene, budget_rays: u64, ) -> RaytraceStats
Executes one non-blocking tiled progressive rendering step up to budget_rays with zero steady-state heap allocations.
§Arguments
&Self- Mutable session owning persistent HDR, G-buffer, denoiser, and RGBA8 buffers.&RaytraceScene- Scene to ray-trace.u64- Ray budget limiting work per UI frame (>= 1; stops early at pass completion).
§Returns
RaytraceStats- Updated telemetry including samples per pixel, ray breakdowns, and MRays/sec.
Sourcepub fn render_full_pass(&mut self, scene: &RaytraceScene) -> RaytraceStats
pub fn render_full_pass(&mut self, scene: &RaytraceScene) -> RaytraceStats
Sourcepub fn render_samples(
&mut self,
scene: &RaytraceScene,
samples: u32,
) -> RaytraceStats
pub fn render_samples( &mut self, scene: &RaytraceScene, samples: u32, ) -> RaytraceStats
Renders samples complete progressive passes sequentially with a single parallel SVGF denoise and tonemap at completion.
§Arguments
&Self- Mutable session reference.&RaytraceScene- Scene to trace.u32- Number of full samples per pixel to accumulate.
§Returns
RaytraceStats- Final telemetry snapshot.
Sourcepub fn rgba8_slice(&self) -> &[u8] ⓘ
pub fn rgba8_slice(&self) -> &[u8] ⓘ
Source§impl RaytraceSession
Implements impl #impl_generics #name #ty_generics #where_clause.
impl RaytraceSession
Implements impl #impl_generics #name #ty_generics #where_clause.