From 78a780b81868e990377bc006af9471fcf41880ad Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 7 Sep 2024 20:00:42 -0700 Subject: [PATCH] Tweak spatial re-use settings to avoid misses --- blade-render/code/ray-trace.wgsl | 2 +- examples/scene/main.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blade-render/code/ray-trace.wgsl b/blade-render/code/ray-trace.wgsl index 9e0726e6..0b70f69e 100644 --- a/blade-render/code/ray-trace.wgsl +++ b/blade-render/code/ray-trace.wgsl @@ -555,7 +555,7 @@ fn resample_spatial( var accepted_count = 0u; var accepted_local_indices = array(); let max_accepted = min(MAX_RESAMPLE, parameters.spatial_taps); - let num_candidates = parameters.spatial_taps * 3u; + let num_candidates = parameters.spatial_taps * 4u; for (var i = 0u; i < num_candidates && accepted_count < max_accepted; i += 1u) { let other_cache_index = random_u32(rng) % GROUP_SIZE_TOTAL; let diff = thread_index_to_coord(other_cache_index, group_id) - cur_pixel; diff --git a/examples/scene/main.rs b/examples/scene/main.rs index a6be3e9d..5ee2beca 100644 --- a/examples/scene/main.rs +++ b/examples/scene/main.rs @@ -263,7 +263,7 @@ impl Example { temporal_confidence: 10.0, spatial_taps: 1, spatial_confidence: 5.0, - spatial_min_distance: 4, + spatial_min_distance: 2, group_mixer: 10, t_start: 0.1, pairwise_mis: true, diff --git a/src/lib.rs b/src/lib.rs index a91c33b2..774e5cea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -488,7 +488,7 @@ impl Engine { temporal_confidence: 10.0, spatial_taps: 1, spatial_confidence: 5.0, - spatial_min_distance: 4, + spatial_min_distance: 2, group_mixer: 10, t_start: 0.01, pairwise_mis: true,