[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43792] trunk/blender/intern/cycles/kernel /kernel_path.h: Fix #30034: bug in multiple importance sampling + transparency, would

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Jan 31 15:57:57 CET 2012


Revision: 43792
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43792
Author:   blendix
Date:     2012-01-31 14:57:46 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
Fix #30034: bug in multiple importance sampling + transparency, would
give slightly wrong lighting behind transparent objects.

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/kernel_path.h

Modified: trunk/blender/intern/cycles/kernel/kernel_path.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_path.h	2012-01-31 11:11:56 UTC (rev 43791)
+++ trunk/blender/intern/cycles/kernel/kernel_path.h	2012-01-31 14:57:46 UTC (rev 43792)
@@ -220,9 +220,7 @@
 
 	path_radiance_init(&L, kernel_data.film.use_light_pass);
 
-#if defined(__EMISSION__) || defined(__BACKGROUND__)
 	float ray_pdf = 0.0f;
-#endif
 	PathState state;
 	int rng_offset = PRNG_BASE_NUM;
 
@@ -344,9 +342,8 @@
 		path_radiance_bsdf_bounce(&L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
 
 		/* set labels */
-#if defined(__EMISSION__) || defined(__BACKGROUND__)
-		ray_pdf = bsdf_pdf;
-#endif
+		if(!(label & LABEL_TRANSPARENT))
+			ray_pdf = bsdf_pdf;
 
 		/* update path state */
 		path_state_next(kg, &state, label);



More information about the Bf-blender-cvs mailing list