[Bf-blender-cvs] [3c852ba0741] master: Fix T53914: Volumetric scattering now goes correctly through transparent surfaces.

Stefan Werner noreply at git.blender.org
Sat Jan 27 21:39:20 CET 2018


Commit: 3c852ba0741f794a697f95073b04921e9ff94039
Author: Stefan Werner
Date:   Sat Jan 27 10:36:22 2018 +0100
Branches: master
https://developer.blender.org/rB3c852ba0741f794a697f95073b04921e9ff94039

Fix T53914: Volumetric scattering now goes correctly through transparent surfaces.

There was a check for volume bounces at every surface intersection. That could lead to a volume scattered path being terminated
when passing through a transparent surface. This check was superfluous, as the volume shader evaluation already checks the
number of volume bounces and once it passes the max, volume shaders will not return scatter events any more.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T53914

Differential Revision: https://developer.blender.org/D3024

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

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 2ae866bb051..e5e915791cb 100644
--- a/intern/cycles/kernel/kernel_path_state.h
+++ b/intern/cycles/kernel/kernel_path_state.h
@@ -179,13 +179,13 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg,
 #endif
 	}
 	else {
-		/* Test max bounces for various ray types. */
+		/* Test max bounces for various ray types. 
+		   The check for max_volume_bounce doesn't happen here but inside volume_shader_sample().
+		   See T53914.
+		 */
 		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;



More information about the Bf-blender-cvs mailing list