diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-06-15 14:15:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-06-15 14:15:10 +0400 |
commit | 6a8fceb8b8691f0084fa9fe69298aca2cebaaba4 (patch) | |
tree | 68e3263e737f2958d7ebb65981c41e579d94a8e8 | |
parent | ec755bdfa7920c9db4dd771c065e85539b00d140 (diff) |
Fix cycles non-progressive integrator not delivering correct AO pass.
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 2da6a7e4d8f..98ab9169c21 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -692,6 +692,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam /* 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 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam 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); } } } |