add early termination

This commit is contained in:
2026-10-29 22:41:19 +00:00
parent d94d044d1d
commit 2d16ecc422
6 changed files with 34 additions and 16 deletions
@@ -96,7 +96,7 @@ fn generate_initial_path(world_position: vec3<f32>, world_normal: vec3<f32>, mat
// Sample the BRDF and trace the next ray
let next_bounce = evaluate_and_sample_brdf(path.wo, path.normal, path.material, F_ab, rng);
if next_bounce.pdf == 0.0 { break; }
let ray = trace_ray(path.ray_origin, next_bounce.wi, RAY_T_MIN, RAY_T_MAX, RAY_FLAG_NONE);
let ray = trace_ray(path.ray_origin, next_bounce.wi, RAY_T_MIN, RAY_T_MAX, RAY_FLAG_NONE, false);
if ray.kind == RAY_QUERY_INTERSECTION_NONE {
@if(DLSS_RR_GUIDE_BUFFERS)