forked from bartvdbraak/blender
Bugfix #1915
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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user