Merged changes in the trunk up to revision 30952.
[blender-staging.git] / source / blender / render / intern / source / shadeoutput.c
index 449d3da0b6d9363a251e9a6264efacee5eefff60..00eb6e3d17d8324f0e307afbe48770d1e23d2d80 100644 (file)
@@ -1644,7 +1644,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
                if(((passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
                        || (passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT))) {
                        /* AO was calculated for scanline already */
-                       if(shi->depth)
+                       if(shi->depth || shi->volume_depth)
                                ambient_occlusion(shi);
                        VECCOPY(shr->ao, shi->ao);
                        VECCOPY(shr->env, shi->env); // XXX multiply