Fix use of uninitialized variable in some cases with scatter + emission volume.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 27 Feb 2014 20:25:50 +0000 (21:25 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 27 Feb 2014 22:41:00 +0000 (23:41 +0100)
intern/cycles/kernel/kernel_volume.h

index ec0c3114213578593c2e68afdb31cb05cf51afe6..778ab4e600a98d7c0a4a8f2cea3ae66b6fcdd809 100644 (file)
@@ -257,7 +257,7 @@ ccl_device VolumeIntegrateResult kernel_volume_integrate_homogeneous(KernelGloba
 
                        if(xi < sample_transmittance) {
                                /* no scattering */
 
                        if(xi < sample_transmittance) {
                                /* no scattering */
-                               float3 transmittance = volume_color_attenuation(sigma_t, t);
+                               transmittance = volume_color_attenuation(sigma_t, t);
                                float pdf = (transmittance.x + transmittance.y + transmittance.z);
                                new_tp = *throughput * transmittance * (3.0f / pdf);
                        }
                                float pdf = (transmittance.x + transmittance.y + transmittance.z);
                                new_tp = *throughput * transmittance * (3.0f / pdf);
                        }