Skip to content

Commit

Permalink
[sppm] This still panics, but matches commit on master branch (issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
wahn committed Sep 28, 2020
1 parent 4314204 commit 7057ab5
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/integrators/sppm.rs
Expand Up @@ -219,8 +219,7 @@ impl SPPMIntegrator {
scene,
&arena_bsdf,
&arena_bxdf,
&mut tile_sampler
.clone_with_seed(0_u64),
&mut tile_sampler,
false,
None,
);
Expand Down Expand Up @@ -351,18 +350,17 @@ impl SPPMIntegrator {
let mut max_radius: Float = 0.0 as Float;
// println!("Compute grid bounds for SPPM visible points ...");
for pixel in pixels.iter().take(n_pixels as usize) {
if pixel.vp.beta.is_black() {
continue;
if !pixel.vp.beta.is_black() {
let vp_bound: Bounds3f = bnd3_expand(
&Bounds3f {
p_min: pixel.vp.p,
p_max: pixel.vp.p,
},
pixel.radius,
);
grid_bounds = bnd3_union_bnd3f(&grid_bounds, &vp_bound);
max_radius = max_radius.max(pixel.radius);
}
let vp_bound: Bounds3f = bnd3_expand(
&Bounds3f {
p_min: pixel.vp.p,
p_max: pixel.vp.p,
},
pixel.radius,
);
grid_bounds = bnd3_union_bnd3f(&grid_bounds, &vp_bound);
max_radius = max_radius.max(pixel.radius);
}
// compute resolution of SPPM grid in each dimension
let diag: Vector3f = grid_bounds.diagonal();
Expand Down

0 comments on commit 7057ab5

Please sign in to comment.