Fix for [#19299] Color render bug

Caused by very evil AO subtractive mode going negative once again...
This commit is contained in:
2009-11-05 03:39:42 +00:00
parent 9eb0f20224
commit 38f7839218

View File

@@ -1746,6 +1746,10 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
shr->combined[0] += shi->r*aodiff[0];
shr->combined[1] += shi->g*aodiff[1];
shr->combined[2] += shi->b*aodiff[2];
if (shr->combined[0] < 0.f) shr->combined[0]= 0.f;
if (shr->combined[1] < 0.f) shr->combined[1]= 0.f;
if (shr->combined[2] < 0.f) shr->combined[2]= 0.f;
}
}