In unified render, AO with option "Sky" could give black dots, caused by
an overflow due to division by zero (was clipped away in normal render).
This commit is contained in:
Ton Roosendaal 2004-11-30 22:46:13 +00:00
parent 1534066d5b
commit 40f1dfe380

@ -2061,7 +2061,7 @@ void ray_ao(ShadeInput *shi, World *wrld, float *shadfac)
shadfac[3] = 1.0 - sh/((float)actual);
if(wrld->aocolor!=WO_AOPLAIN) {
if(wrld->aocolor!=WO_AOPLAIN && skyadded) {
div= shadfac[3]/((float)skyadded);
shadfac[0]*= div; // average color times distances/hits formula