1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
use super::*;
#[cfg(not(target_arch = "wasm32"))]
// SAFETY: `EngineWorkerPool::parallel_for_chunks` partitions output slices into strictly disjoint pixel ranges.
unsafe impl Sync for RgbaRowMutView {}
#[cfg(not(target_arch = "wasm32"))]
impl RgbaRowMutView {
/// Returns the base mutable byte pointer while capturing the `Sync` wrapper by reference.
///
/// # Returns
///
/// - `*mut u8` - Base pointer to destination RGBA8 bytes.
#[must_use]
pub(crate) fn ptr(&self) -> *mut u8 {
let Self { ptr } = *self;
ptr
}
}
#[cfg(not(target_arch = "wasm32"))]
// SAFETY: `EngineWorkerPool::parallel_for_chunks` partitions framebuffers into strictly disjoint scanline bands.
unsafe impl Sync for RtPassMutView {}
#[cfg(not(target_arch = "wasm32"))]
impl RtPassMutView {
/// Returns base mutable accumulator pointers `(radiance, moment_1, moment_2, sample_counts)`.
///
/// # Returns
///
/// - `(*mut Vec3, *mut f32, *mut f32, *mut u32)` - Base pointers to accumulator buffers.
#[must_use]
pub(crate) fn accum_ptrs(&self) -> (*mut Vec3, *mut f32, *mut f32, *mut u32) {
let Self {
radiance,
moment_1,
moment_2,
sample_counts,
..
} = *self;
(radiance, moment_1, moment_2, sample_counts)
}
/// Returns base mutable G-buffer pointers `(albedo, normal, depth, hit_mask)`.
///
/// # Returns
///
/// - `(*mut Vec3, *mut Vec3, *mut f32, *mut u8)` - Base pointers to G-buffer channels.
#[must_use]
pub(crate) fn gbuffer_ptrs(&self) -> (*mut Vec3, *mut Vec3, *mut f32, *mut u8) {
let Self {
albedo,
normal,
depth,
hit_mask,
..
} = *self;
(albedo, normal, depth, hit_mask)
}
}
/// Default session configuration targeting interactive path tracing with AgX tone mapping and SVGF denoising.
impl Default for RaytraceConfig {
/// Creates a default `RaytraceConfig` at `320x180` using `PathTrace`, `Agx`, and `SvgfDenoiser`.
///
/// # Returns
///
/// - `Self` - Default ray-tracing configuration.
fn default() -> Self {
Self::new(RT_DEFAULT_VIEWPORT_WIDTH, RT_DEFAULT_VIEWPORT_HEIGHT)
}
}
/// Constructors and fluent configuration helpers for `RaytraceConfig`.
impl RaytraceConfig {
/// Creates a `RaytraceConfig` sized for `width x height` pixels with sensible path-tracing defaults.
///
/// # Arguments
///
/// - `u32` - Viewport width in pixels.
/// - `u32` - Viewport height in pixels.
///
/// # Returns
///
/// - `Self` - Configured `RaytraceConfig`.
#[must_use]
pub fn new(width: u32, height: u32) -> Self {
Self {
width: width.max(1),
height: height.max(1),
integrator: RtIntegratorMode::PathTrace,
tonemap: RtTonemapMode::Agx,
exposure: RT_DEFAULT_EXPOSURE,
tile_size: RT_DEFAULT_TILE_SIZE,
enable_denoiser: true,
whitted: WhittedIntegrator::default(),
path_trace: PathTraceIntegrator::default(),
rtao: RtaoIntegrator::default(),
hybrid_preview: HybridPreviewIntegrator::default(),
svgf: SvgfConfig::default(),
seed: RT_DEFAULT_SEED,
}
}
/// Selects the active ray-tracing integrator mode.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `RtIntegratorMode` - Integrator mode to activate.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_integrator(mut self, integrator: RtIntegratorMode) -> Self {
self.set_integrator(integrator);
self
}
/// Selects the display tone-mapping operator.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `RtTonemapMode` - Tone-mapping curve.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_tonemap(mut self, tonemap: RtTonemapMode) -> Self {
self.set_tonemap(tonemap);
self
}
/// Sets the linear HDR exposure multiplier.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `f32` - Positive exposure multiplier.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_exposure(mut self, exposure: f32) -> Self {
self.set_exposure(exposure.max(0.01));
self
}
/// Sets the square tile edge size in pixels for progressive stepping.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `u32` - Tile width/height in pixels (`>= 1`).
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_tile_size(mut self, tile_size: u32) -> Self {
self.set_tile_size(tile_size.max(1));
self
}
/// Enables or disables the multi-pass À-Trous SVGF spatial denoiser.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `bool` - Whether SVGF denoising runs after accumulation.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_denoiser(mut self, enabled: bool) -> Self {
self.set_enable_denoiser(enabled);
self
}
/// Overrides the SVGF denoiser configuration.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `SvgfConfig` - Denoiser edge-stopping parameters.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_svgf(mut self, svgf: SvgfConfig) -> Self {
self.set_svgf(svgf);
self
}
/// Overrides the deterministic base RNG seed.
///
/// # Arguments
///
/// - `Self` - Base configuration.
/// - `u32` - Seed integer.
///
/// # Returns
///
/// - `Self` - Updated configuration.
#[must_use]
pub fn with_seed(mut self, seed: u32) -> Self {
self.set_seed(seed);
self
}
}
/// Zero-steady-state-allocation progressive rendering, resizing, and framebuffer access for `RaytraceSession`.
impl RaytraceSession {
/// Creates a new `RaytraceSession`, pre-allocating all HDR accumulation, G-buffer, denoiser, and RGBA8 buffers once.
///
/// # Arguments
///
/// - `RaytraceConfig` - Session resolution, integrator, denoiser, and tone-mapping parameters.
///
/// # Returns
///
/// - `Self` - Ready-to-render zero-steady-state-allocation session.
#[must_use]
pub fn new(config: RaytraceConfig) -> Self {
let width: u32 = config.get_width().max(1);
let height: u32 = config.get_height().max(1);
let total_pixels: usize = (width as usize).saturating_mul(height as usize);
let mut stats: RaytraceStats = RaytraceStats::default();
stats.set_total_pixels(total_pixels as u32);
Self {
config,
accumulator: TemporalAccumulator::new(width, height),
gbuffer: RtGBuffer::new(width, height),
denoiser: SvgfDenoiser::new(width, height, config.get_svgf()),
variance_scratch: vec![0.0; total_pixels],
denoised_hdr: vec![Vec3::zero(); total_pixels],
rgba8_output: vec![0; total_pixels.saturating_mul(4)],
stats,
tile_cursor: 0,
pass_index: 0,
}
}
/// 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.
pub fn resize(&mut self, width: u32, height: u32) {
let w: u32 = width.max(1);
let h: u32 = height.max(1);
let total_pixels: usize = (w as usize).saturating_mul(h as usize);
let Self {
config,
accumulator,
gbuffer,
denoiser,
variance_scratch,
denoised_hdr,
rgba8_output,
stats,
tile_cursor,
pass_index,
} = self;
config.set_width(w);
config.set_height(h);
accumulator.resize(w, h);
gbuffer.resize(w, h);
denoiser.resize(w, h);
variance_scratch.resize(total_pixels, 0.0);
denoised_hdr.resize(total_pixels, Vec3::zero());
rgba8_output.resize(total_pixels.saturating_mul(4), 0);
*stats = RaytraceStats::default();
stats.set_total_pixels(total_pixels as u32);
*tile_cursor = 0;
*pass_index = 0;
}
/// Resets progressive accumulation, G-buffers, tile progress, and ray telemetry in place with zero heap allocation.
///
/// # Arguments
///
/// - `&Self` - Mutable session reference.
pub fn reset(&mut self) {
let total_pixels: u32 = self
.get_config()
.get_width()
.saturating_mul(self.get_config().get_height());
let Self {
accumulator,
gbuffer,
variance_scratch,
denoised_hdr,
rgba8_output,
stats,
tile_cursor,
pass_index,
..
} = self;
accumulator.reset_accumulation();
gbuffer.clear();
variance_scratch.fill(0.0);
denoised_hdr.fill(Vec3::zero());
rgba8_output.fill(0);
*stats = RaytraceStats::default();
stats.set_total_pixels(total_pixels);
*tile_cursor = 0;
*pass_index = 0;
}
/// Switches the active integrator mode and resets temporal accumulation in place.
///
/// # Arguments
///
/// - `&Self` - Mutable session reference.
/// - `RtIntegratorMode` - New integrator mode.
pub fn set_integrator(&mut self, mode: RtIntegratorMode) {
if self.get_config().get_integrator() != mode {
let mut cfg: RaytraceConfig = self.get_config();
cfg.set_integrator(mode);
self.set_config(cfg);
self.reset();
}
}
/// 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.
pub fn render_progressive_step(
&mut self,
scene: &RaytraceScene,
budget_rays: u64,
) -> RaytraceStats {
let step_start: RtTimer = rt_now();
let cam_fp: u64 = scene.get_camera().motion_fingerprint();
let scene_rev: u64 = scene.get_revision();
let cfg: RaytraceConfig = self.get_config();
let width: u32 = cfg.get_width().max(1);
let height: u32 = cfg.get_height().max(1);
let total_pixels: u32 = width.saturating_mul(height);
let tile_size: u32 = cfg.get_tile_size().max(1);
let tiles_x: u32 = width.div_ceil(tile_size);
let tiles_y: u32 = height.div_ceil(tile_size);
let total_tiles: u32 = tiles_x.saturating_mul(tiles_y).max(1);
let Self {
accumulator,
gbuffer,
denoiser,
variance_scratch,
denoised_hdr,
rgba8_output,
stats,
tile_cursor,
pass_index,
..
} = self;
if accumulator.sync_motion(cam_fp, scene_rev) {
gbuffer.clear();
variance_scratch.fill(0.0);
*tile_cursor = 0;
*pass_index = 0;
*stats = RaytraceStats::default();
stats.set_total_pixels(total_pixels);
}
denoiser.set_config(cfg.get_svgf());
let ray_budget: u64 = budget_rays.max(1);
let mut step_counter: RtRayCounter = RtRayCounter::default();
let mut pixels_this_step: u32 = 0;
let camera: RtCamera = scene.get_camera();
let base_seed: u32 = cfg.get_seed();
let resolution: [u32; 2] = [width, height];
if ray_budget == u64::MAX && *tile_cursor == 0 {
let current_pass: u32 = *pass_index;
let pass_counter: RtRayCounter =
trace_full_pass_parallel(&cfg, scene, current_pass, accumulator, gbuffer);
step_counter.merge(pass_counter);
pixels_this_step = total_pixels;
*pass_index = pass_index.saturating_add(1);
} else {
let mut tiles_processed: u32 = 0;
while step_counter.total_rays() < ray_budget && tiles_processed < total_tiles {
let tile_idx: u32 = *tile_cursor;
let tx: u32 = tile_idx % tiles_x;
let ty: u32 = tile_idx / tiles_x;
let x_start: u32 = tx.saturating_mul(tile_size);
let y_start: u32 = ty.saturating_mul(tile_size);
let x_end: u32 = x_start.saturating_add(tile_size).min(width);
let y_end: u32 = y_start.saturating_add(tile_size).min(height);
let current_pass: u32 = *pass_index;
let jitter: [f32; 2] = r2_subpixel_jitter(current_pass);
for py in y_start..y_end {
let row_offset: usize = (py as usize) * (width as usize);
for px in x_start..x_end {
let pixel_idx: usize = row_offset + (px as usize);
let mut rng: RtRng =
RtRng::from_pixel_sample(pixel_idx as u32, current_pass, base_seed);
let lens_xi: [f32; 2] = rng.next_f32_pair();
let ray: Ray3D = camera.generate_ray([px, py], resolution, jitter, lens_xi);
let sample_out: RtSampleOutput =
dispatch_integrator_ray(&cfg, scene, &ray, &mut rng, &mut step_counter);
accumulator.accumulate_pixel(pixel_idx, sample_out.get_radiance());
if current_pass == 0 || gbuffer.get_hit_mask()[pixel_idx] == 0 {
gbuffer.set_pixel(
pixel_idx,
sample_out.get_albedo(),
sample_out.get_normal(),
sample_out.get_depth(),
sample_out.get_hit(),
);
}
pixels_this_step = pixels_this_step.saturating_add(1);
}
}
tiles_processed += 1;
*tile_cursor += 1;
if *tile_cursor >= total_tiles {
*tile_cursor = 0;
*pass_index = pass_index.saturating_add(1);
break;
}
}
}
let denoise_start: RtTimer = rt_now();
if cfg.get_enable_denoiser() {
accumulator.write_variance_into(gbuffer, variance_scratch.as_mut_slice());
denoiser.denoise(
accumulator.get_radiance().as_slice(),
variance_scratch.as_slice(),
gbuffer,
denoised_hdr.as_mut_slice(),
);
} else {
denoised_hdr.copy_from_slice(accumulator.get_radiance().as_slice());
}
let denoise_ms: f32 = rt_elapsed_ms(denoise_start);
tonemap_hdr_to_rgba8(
denoised_hdr.as_slice(),
cfg.get_tonemap(),
cfg.get_exposure(),
rgba8_output.as_mut_slice(),
);
let step_ms: f32 = rt_elapsed_ms(step_start);
let step_rays: u64 = step_counter.total_rays();
let mrays_per_sec: f32 = if step_ms > 1e-4 {
((step_rays as f32) / (step_ms * 1000.0)).max(0.0)
} else {
0.0
};
let next_primary: u64 = stats
.get_primary_rays()
.saturating_add(step_counter.get_primary_rays());
let next_shadow: u64 = stats
.get_shadow_rays()
.saturating_add(step_counter.get_shadow_rays());
let next_bounce: u64 = stats
.get_bounce_rays()
.saturating_add(step_counter.get_bounce_rays());
let next_total: u64 = next_primary
.saturating_add(next_shadow)
.saturating_add(next_bounce);
stats.set_samples_per_pixel(accumulator.average_samples_per_pixel());
stats.set_completed_passes(*pass_index);
stats.set_primary_rays(next_primary);
stats.set_shadow_rays(next_shadow);
stats.set_bounce_rays(next_bounce);
stats.set_total_rays(next_total);
stats.set_last_step_rays(step_rays);
stats.set_last_step_ms(step_ms);
stats.set_mrays_per_sec(mrays_per_sec);
stats.set_denoise_ms(denoise_ms);
stats.set_pixels_traced_in_pass(if *tile_cursor == 0 {
total_pixels
} else {
stats
.get_pixels_traced_in_pass()
.saturating_add(pixels_this_step)
.min(total_pixels)
});
stats.set_total_pixels(total_pixels);
*stats
}
/// Renders one complete full-frame pass across all viewport pixels with zero steady-state allocations.
///
/// # Arguments
///
/// - `&Self` - Mutable session reference.
/// - `&RaytraceScene` - Scene to trace.
///
/// # Returns
///
/// - `RaytraceStats` - Telemetry after completing the pass.
pub fn render_full_pass(&mut self, scene: &RaytraceScene) -> RaytraceStats {
let start_pass: u32 = self.get_pass_index();
let mut latest: RaytraceStats = self.render_progressive_step(scene, u64::MAX);
if latest.get_completed_passes() == start_pass && self.get_tile_cursor() != 0 {
latest = self.render_progressive_step(scene, u64::MAX);
}
latest
}
/// 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.
pub fn render_samples(&mut self, scene: &RaytraceScene, samples: u32) -> RaytraceStats {
let count: u32 = samples.max(1);
if count == 1 || self.get_tile_cursor() != 0 {
let mut latest: RaytraceStats = self.get_stats();
for _ in 0..count {
latest = self.render_full_pass(scene);
}
return latest;
}
let step_start: RtTimer = rt_now();
let cam_fp: u64 = scene.get_camera().motion_fingerprint();
let scene_rev: u64 = scene.get_revision();
let cfg: RaytraceConfig = self.get_config();
let width: u32 = cfg.get_width().max(1);
let height: u32 = cfg.get_height().max(1);
let total_pixels: u32 = width.saturating_mul(height);
let Self {
accumulator,
gbuffer,
denoiser,
variance_scratch,
denoised_hdr,
rgba8_output,
stats,
tile_cursor,
pass_index,
..
} = self;
if accumulator.sync_motion(cam_fp, scene_rev) {
gbuffer.clear();
variance_scratch.fill(0.0);
*tile_cursor = 0;
*pass_index = 0;
*stats = RaytraceStats::default();
stats.set_total_pixels(total_pixels);
}
denoiser.set_config(cfg.get_svgf());
let mut step_counter: RtRayCounter = RtRayCounter::default();
for _ in 0..count {
let current_pass: u32 = *pass_index;
let pass_counter: RtRayCounter =
trace_full_pass_parallel(&cfg, scene, current_pass, accumulator, gbuffer);
step_counter.merge(pass_counter);
*pass_index = pass_index.saturating_add(1);
}
let denoise_start: RtTimer = rt_now();
if cfg.get_enable_denoiser() {
accumulator.write_variance_into(gbuffer, variance_scratch.as_mut_slice());
denoiser.denoise(
accumulator.get_radiance().as_slice(),
variance_scratch.as_slice(),
gbuffer,
denoised_hdr.as_mut_slice(),
);
} else {
denoised_hdr.copy_from_slice(accumulator.get_radiance().as_slice());
}
let denoise_ms: f32 = rt_elapsed_ms(denoise_start);
tonemap_hdr_to_rgba8(
denoised_hdr.as_slice(),
cfg.get_tonemap(),
cfg.get_exposure(),
rgba8_output.as_mut_slice(),
);
let step_ms: f32 = rt_elapsed_ms(step_start);
let step_rays: u64 = step_counter.total_rays();
let mrays_per_sec: f32 = if step_ms > 1e-4 {
((step_rays as f32) / (step_ms * 1000.0)).max(0.0)
} else {
0.0
};
let next_primary: u64 = stats
.get_primary_rays()
.saturating_add(step_counter.get_primary_rays());
let next_shadow: u64 = stats
.get_shadow_rays()
.saturating_add(step_counter.get_shadow_rays());
let next_bounce: u64 = stats
.get_bounce_rays()
.saturating_add(step_counter.get_bounce_rays());
let next_total: u64 = next_primary
.saturating_add(next_shadow)
.saturating_add(next_bounce);
stats.set_samples_per_pixel(accumulator.average_samples_per_pixel());
stats.set_completed_passes(*pass_index);
stats.set_primary_rays(next_primary);
stats.set_shadow_rays(next_shadow);
stats.set_bounce_rays(next_bounce);
stats.set_total_rays(next_total);
stats.set_last_step_rays(step_rays);
stats.set_last_step_ms(step_ms);
stats.set_mrays_per_sec(mrays_per_sec);
stats.set_denoise_ms(denoise_ms);
stats.set_pixels_traced_in_pass(total_pixels);
stats.set_total_pixels(total_pixels);
*stats
}
/// Returns a read-only view of the tone-mapped sRGB RGBA8 output framebuffer (`width * height * 4`).
///
/// # Arguments
///
/// - `&Self` - Session reference.
///
/// # Returns
///
/// - `&[u8]` - Contiguous RGBA8 byte slice ready for UI blitting or `ImageBuffer`.
#[must_use]
pub fn rgba8_slice(&self) -> &[u8] {
self.get_rgba8_output().as_slice()
}
/// Returns a read-only view of the linear denoised (or raw accumulated) HDR RGB buffer.
///
/// # Arguments
///
/// - `&Self` - Session reference.
///
/// # Returns
///
/// - `&[Vec3]` - Contiguous linear HDR RGB pixel slice.
#[must_use]
pub fn hdr_slice(&self) -> &[Vec3] {
self.get_denoised_hdr().as_slice()
}
}