Optimize for AO: when material ambient value is zero, no AO calculus
takes place now. Also nice to tweak & speedup environments. (Thanks Theeth for hint!)
This commit is contained in:
@@ -1653,7 +1653,7 @@ static void ambient_occlusion(World *wrld, ShadeInput *shi, ShadeResult *shr)
|
||||
{
|
||||
float f, shadfac[4];
|
||||
|
||||
if((wrld->mode & WO_AMB_OCC) && (R.r.mode & R_RAYTRACE)) {
|
||||
if((wrld->mode & WO_AMB_OCC) && (R.r.mode & R_RAYTRACE) && shi->matren->amb!=0.0) {
|
||||
ray_ao(shi, wrld, shadfac);
|
||||
|
||||
if(wrld->aocolor==WO_AOPLAIN) {
|
||||
|
||||
Reference in New Issue
Block a user