Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-15 14:15:10 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-15 14:15:10 +0400
commit6a8fceb8b8691f0084fa9fe69298aca2cebaaba4 (patch)
tree68e3263e737f2958d7ebb65981c41e579d94a8e8 /intern
parentec755bdfa7920c9db4dd771c065e85539b00d140 (diff)
Fix cycles non-progressive integrator not delivering correct AO pass.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_path.h3
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);
}
}
}