Revision: 20529
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20529
Author:   ton
Date:     2009-05-31 13:22:11 +0200 (Sun, 31 May 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/shadeoutput.c

Modified: trunk/blender/source/blender/render/intern/source/shadeoutput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeoutput.c     
2009-05-31 11:14:50 UTC (rev 20528)
+++ trunk/blender/source/blender/render/intern/source/shadeoutput.c     
2009-05-31 11:22:11 UTC (rev 20529)
@@ -1005,11 +1005,12 @@
 }
 
 /* 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;


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to