diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-12 03:27:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-12 13:43:26 +0300 |
commit | d454a44e96649103772ae2c8707ee1ef5e46080c (patch) | |
tree | b410e5ceb5c570b9e12e8735bc7dfd2034422057 /intern/cycles | |
parent | 467d92b8f1c7231eb801194a94cbaeb75c4d5eab (diff) |
Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_path_state.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index b539224db31..af208ff37f1 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -201,7 +201,7 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, c /* Probalistic termination: use sqrt() to roughly match typical view * transform and do path termination a bit later on average. */ - return sqrtf(max3(fabs(throughput))); + return min(sqrtf(max3(fabs(throughput))), 1.0f); } /* TODO(DingTo): Find more meaningful name for this */ |