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
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.
pub fn get_config(&self) -> RaytraceConfig
pub fn get_mut_config(&mut self) -> &mut RaytraceConfig
pub fn set_config(&mut self, val: RaytraceConfig) -> &mut Self
pub fn get_accumulator(&self) -> &TemporalAccumulator
pub fn get_mut_accumulator(&mut self) -> &mut TemporalAccumulator
pub fn set_accumulator(&mut self, val: TemporalAccumulator) -> &mut Self
pub fn get_gbuffer(&self) -> &RtGBuffer
pub fn get_mut_gbuffer(&mut self) -> &mut RtGBuffer
pub fn set_gbuffer(&mut self, val: RtGBuffer) -> &mut Self
pub fn get_denoiser(&self) -> &SvgfDenoiser
pub fn get_mut_denoiser(&mut self) -> &mut SvgfDenoiser
pub fn set_denoiser(&mut self, val: SvgfDenoiser) -> &mut Self
pub fn get_denoised_hdr(&self) -> &Vec<Vec3>
pub fn get_mut_denoised_hdr(&mut self) -> &mut Vec<Vec3>
pub fn set_denoised_hdr(&mut self, val: Vec<Vec3>) -> &mut Self
pub fn get_rgba8_output(&self) -> &Vec<u8> ⓘ
pub fn get_mut_rgba8_output(&mut self) -> &mut Vec<u8> ⓘ
pub fn set_rgba8_output(&mut self, val: Vec<u8>) -> &mut Self
pub fn get_stats(&self) -> RaytraceStats
pub fn get_mut_stats(&mut self) -> &mut RaytraceStats
pub fn set_stats(&mut self, val: RaytraceStats) -> &mut Self
pub fn get_tile_cursor(&self) -> u32
pub fn get_mut_tile_cursor(&mut self) -> &mut u32
pub fn set_tile_cursor(&mut self, val: u32) -> &mut Self
pub fn get_pass_index(&self) -> u32
pub fn get_mut_pass_index(&mut self) -> &mut u32
pub fn set_pass_index(&mut self, val: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for RaytraceSession
impl Clone for RaytraceSession
Auto Trait Implementations§
impl Forget for RaytraceSession
impl Freeze for RaytraceSessionwhere
*const u8 is !null: Freeze,
PhantomData<Vec3>: Freeze,
PhantomData<f32>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<u8>: Freeze,
impl Move for RaytraceSession
impl RefUnwindSafe for RaytraceSession
impl Send for RaytraceSessionwhere
RawVecInner: Send,
impl Sync for RaytraceSessionwhere
RawVecInner: Sync,
impl Unpin for RaytraceSession
impl UnsafeUnpin for RaytraceSessionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Vec3>: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for RaytraceSessionwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more