Fix #33188: AO pass wrong after recent change.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Nov 2012 21:32:05 +0000 (21:32 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Nov 2012 21:32:05 +0000 (21:32 +0000)
intern/cycles/kernel/kernel_path.h

index b893aa4d03da147a79525aef482be257b9b53ceb..70a9b372ebc12aa77824880dcea8fde98d2ed5fb 100644 (file)
@@ -339,7 +339,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
 
                        sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
 
                        sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
-                       if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f && average(ao_bsdf) != 0.0f) {
+                       if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f) {
                                Ray light_ray;
                                float3 ao_shadow;
 
                                Ray light_ray;
                                float3 ao_shadow;
 
@@ -517,7 +517,7 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
 
                        sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
 
                        sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
-                       if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f && average(ao_bsdf) != 0.0f) {
+                       if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f) {
                                Ray light_ray;
                                float3 ao_shadow;
 
                                Ray light_ray;
                                float3 ao_shadow;
 
@@ -725,7 +725,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
 
                                sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
 
                                sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
 
-                               if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f && average(ao_bsdf) != 0.0f) {
+                               if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f) {
                                        Ray light_ray;
                                        float3 ao_shadow;
 
                                        Ray light_ray;
                                        float3 ao_shadow;