[Bf-blender-cvs] [d454a44e966] master: Fix Cycles bug in RR termination, probability should never be > 1.0.

Brecht Van Lommel noreply at git.blender.org
Tue Sep 12 13:01:20 CEST 2017


Commit: d454a44e96649103772ae2c8707ee1ef5e46080c
Author: Brecht Van Lommel
Date:   Tue Sep 12 02:27:02 2017 +0200
Branches: master
https://developer.blender.org/rBd454a44e96649103772ae2c8707ee1ef5e46080c

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.

===================================================================

M	intern/cycles/kernel/kernel_path_state.h

===================================================================

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 */



More information about the Bf-blender-cvs mailing list