commit f55954dc9d84e50d4d41206923e1d599c61280dc
parent d5cde6ab4758362df83af62b4a536f69be9426f7
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 8 Mar 2017 14:13:21 +0100
Minor fix of the russian roulette in the path-tracing integrator
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ssol_draw_pt.c b/src/ssol_draw_pt.c
@@ -194,15 +194,15 @@ Li
f3_set_d3(ray_dir, wi);
if(!russian_roulette) {
- russian_roulette = throughput < 0.1;
- }
-
- if(!russian_roulette) {
throughput *= d3_dot(wi, N) * R;
} else {
if(ssp_rng_canonical(ctx->rng) >= R) break;
throughput *= d3_dot(wi, N);
}
+
+ if(!russian_roulette) {
+ russian_roulette = throughput < 0.1;
+ }
}
d3_splat(val, L);
}