diff options
author | Ton Roosendaal <ton@blender.org> | 2009-05-31 15:22:11 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-05-31 15:22:11 +0400 |
commit | 011d91624ee0f0ced5462995faec16b2e6f44142 (patch) | |
tree | 484473d54f76da0d9024f3c1a7b731002c194d6c /source/blender/render/intern | |
parent | a1962cf3ee02b504babd4cc6fcff8e66bc9ea715 (diff) |
AO render error, caused by bugfix after RC3 :(
My bug fix to support AO with "Amb" texture channel changed code too that calls
AO as a pre-shade process, when texture isn't calculated yet. This caused very
first pixel in a tile to show wrong AO.
Especially myself deserves a kick in butt for not testing the regression files
for release binaries again! Error shows clearly... in the cornelius_passes
.blend file.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 869cca0f7d0..130cda9f107 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -1005,11 +1005,12 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float *spec) } /* pure AO, check for raytrace and world should have been done */ +/* 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->amb!=0.0f) + if((R.wrld.ao_gather_method == WO_AOGATHER_APPROX) && shi->mat->amb!=0.0f) sample_occ(&R, shi); - else if((R.r.mode & R_RAYTRACE) && shi->amb!=0.0f) + else if((R.r.mode & R_RAYTRACE) && shi->mat->amb!=0.0f) ray_ao(shi, shi->ao); else shi->ao[0]= shi->ao[1]= shi->ao[2]= 1.0f; |