Revert "Fix T53914: Volumetric scattering now goes correctly through transparent...
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 29 Jan 2018 14:59:46 +0000 (15:59 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 29 Jan 2018 16:07:08 +0000 (17:07 +0100)
This reverts commit 3c852ba0741f794a697f95073b04921e9ff94039. This is breaking
the regression tests, and maybe requires some deeper changes to really fix.

intern/cycles/kernel/kernel_path_state.h

index e5e915791cbb1b427e35fb53ecef8e64b7f93604..2ae866bb051996b6b9c1ccb946793e48e606bc5e 100644 (file)
@@ -179,13 +179,13 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg,
 #endif
        }
        else {
-               /* Test max bounces for various ray types. 
-                  The check for max_volume_bounce doesn't happen here but inside volume_shader_sample().
-                  See T53914.
-                */
+               /* Test max bounces for various ray types. */
                if((state->bounce >= kernel_data.integrator.max_bounce) ||
                   (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) ||
                   (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) ||
+#ifdef __VOLUME__
+                  (state->volume_bounce >= kernel_data.integrator.max_volume_bounce) ||
+#endif
                   (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce))
                {
                        return 0.0f;