Merged changes in the trunk up to revision 43881.
[blender.git] / source / blender / render / intern / source / shadeoutput.c
index 619a16ae6b5dc7e925a8859d6a2456d0135ede99..6b021d0be42a4ce8adec12df8f4c5da056967a6d 100644 (file)
@@ -1030,9 +1030,9 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float spec[3])
 /* preprocess, textures were not done, don't use shi->amb for that reason */
 void ambient_occlusion(ShadeInput *shi)
 {
-       if((R.wrld.ao_gather_method == WO_AOGATHER_APPROX) && shi->mat->amb!=0.0f)
+       if(R.wrld.ao_gather_method == WO_AOGATHER_APPROX)
                sample_occ(&R, shi);
-       else if((R.r.mode & R_RAYTRACE) && shi->mat->amb!=0.0f)
+       else if(R.r.mode & R_RAYTRACE)
                ray_ao(shi, shi->ao, shi->env);
        else
                shi->ao[0]= shi->ao[1]= shi->ao[2]= 1.0f;