Fix cycles issue with non-progressive integrator and AO, setting AO samples > 1
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 21 Aug 2012 09:01:50 +0000 (09:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 21 Aug 2012 09:01:50 +0000 (09:01 +0000)
did not give properly normalized values.

intern/cycles/kernel/kernel_path.h

index f5188345948de24bf972a01173c1c252fa1ef118..8d983a4ec75f80ea19639f4c9fdc7cd8efcca38f 100644 (file)
@@ -693,7 +693,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
                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;
+                       float ao_factor = kernel_data.background.ao_factor;
 
                        for(int j = 0; j < num_samples; j++) {
                                /* todo: solve correlation */