From d454a44e96649103772ae2c8707ee1ef5e46080c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 12 Sep 2017 02:27:02 +0200 Subject: 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. --- intern/cycles/kernel/kernel_path_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern') 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 */ -- cgit v1.2.3