diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-10 23:28:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-10 23:28:16 +0400 |
commit | 0deb074f1c09d4e2bf74cd099bce565aea4527bb (patch) | |
tree | becaea8bd8caca97f0023b5b82057fd1aa2d3c98 /intern | |
parent | d2f9b8a2c08a07fcc1dad8a32166643a25217aba (diff) |
Fix #33824: cycles non-progressive render mode did not do correct path termination,
leading to too much noise when the min bounce setting was lower than max bounce.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 6302031475a..532c32896d9 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -486,7 +486,8 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample, #ifdef __NON_PROGRESSIVE__ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer, - float3 throughput, float min_ray_pdf, float ray_pdf, PathState state, int rng_offset, PathRadiance *L) + float3 throughput, float throughput_normalize, + float min_ray_pdf, float ray_pdf, PathState state, int rng_offset, PathRadiance *L) { #ifdef __LAMP_MIS__ float ray_t = 0.0f; @@ -558,7 +559,7 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray /* path termination. this is a strange place to put the termination, it's * mainly due to the mixed in MIS that we use. gives too many unneeded * shader evaluations, only need emission if we are going to terminate */ - float probability = path_state_terminate_probability(kg, &state, throughput); + float probability = path_state_terminate_probability(kg, &state, throughput*throughput_normalize); float terminate = path_rng(kg, rng, sample, rng_offset + PRNG_TERMINATE); if(terminate >= probability) { @@ -946,7 +947,8 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam #endif kernel_path_indirect(kg, rng, sample*num_samples + j, bsdf_ray, buffer, - tp*num_samples_inv, min_ray_pdf, bsdf_pdf, ps, rng_offset+PRNG_BOUNCE_NUM, &L); + tp*num_samples_inv, num_samples, + min_ray_pdf, bsdf_pdf, ps, rng_offset+PRNG_BOUNCE_NUM, &L); } } |