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.
This commit is contained in:
Ton Roosendaal 2009-05-31 11:22:11 +00:00
parent a1962cf3ee
commit 011d91624e

@ -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;