Cleanup: fix compiler warnings.
[blender.git] / intern / cycles / kernel / kernel_volume.h
index 1df5050443489a8025914c48c5dae2ee80ef3deb..44c8f795d2cec3459300c99f0e164190c4eb87f5 100644 (file)
@@ -486,6 +486,9 @@ ccl_device VolumeIntegrateResult kernel_volume_integrate_homogeneous(
                float3 transmittance = volume_color_transmittance(coeff.sigma_t, t);
                new_tp = *throughput * transmittance;
        }
+       else {
+               new_tp = *throughput;
+       }
 
        /* integrate emission attenuated by extinction */
        if(L && (closure_flag & SD_EMISSION)) {
@@ -607,6 +610,9 @@ ccl_device VolumeIntegrateResult kernel_volume_integrate_heterogeneous_distance(
                                transmittance = volume_color_transmittance(coeff.sigma_t, dt);
                                new_tp = tp * transmittance;
                        }
+                       else {
+                               new_tp = tp;
+                       }
 
                        /* integrate emission attenuated by absorption */
                        if(L && (closure_flag & SD_EMISSION)) {