diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-30 23:47:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-30 23:47:30 +0400 |
commit | 40beecea8f4ec6fd47385c318c48fc191f0a7eaa (patch) | |
tree | 35df05be7aabbc46eb3d1c2646d2e7880c43c07c /source | |
parent | 8ec8aaf77f0c90cdfc13800a6e839fc88db07e2c (diff) |
Fix #30026: errors rendering material with ambient 0 and AO/env/indirect light.
It would skip rendering the latter if ambient was 0, however this is not actually
used in adding the contribution from these.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index e2cfd25c40b..0e9cfd11a68 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -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; |