[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47942] trunk/blender/intern/cycles/kernel /kernel_path.h: Fix cycles non-progressive integrator not delivering correct AO pass.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jun 15 12:15:15 CEST 2012


Revision: 47942
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47942
Author:   blendix
Date:     2012-06-15 10:15:10 +0000 (Fri, 15 Jun 2012)
Log Message:
-----------
Fix cycles non-progressive integrator not delivering correct AO pass.

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-06-15 09:58:52 UTC (rev 47941)
+++ trunk/blender/intern/cycles/kernel/kernel_path.h	2012-06-15 10:15:10 UTC (rev 47942)
@@ -692,6 +692,7 @@
 		/* ambient occlusion */
 		if(kernel_data.integrator.use_ambient_occlusion) {
 			int num_samples = kernel_data.integrator.ao_samples;
+			float num_samples_inv = 1.0f/num_samples;
 			float ao_factor = kernel_data.background.ao_factor/num_samples;
 
 			for(int j = 0; j < num_samples; j++) {
@@ -717,7 +718,7 @@
 
 					if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow)) {
 						float3 ao_bsdf = shader_bsdf_diffuse(kg, &sd)*ao_factor;
-						path_radiance_accum_ao(&L, throughput, ao_bsdf, ao_shadow, state.bounce);
+						path_radiance_accum_ao(&L, throughput*num_samples_inv, ao_bsdf, ao_shadow, state.bounce);
 					}
 				}
 			}




More information about the Bf-blender-cvs mailing list