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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user