# | Line 622 | Line 622 | ComputeSky(float *parr) | |
---|---|---|
622 | /* Calculate relative horizontal illuminance */ | |
623 | norm_diff_illum = CalcRelHorzIllum(parr); | |
624 | ||
625 | + | /* Check for zero sky -- make uniform in that case */ |
626 | + | if (norm_diff_illum <= FTINY) { |
627 | + | for (i = 1; i < nskypatch; i++) |
628 | + | setcolor(parr+3*i, 1., 1., 1.); |
629 | + | norm_diff_illum = PI; |
630 | + | } |
631 | /* Normalization coefficient */ | |
632 | norm_diff_illum = diff_illum / norm_diff_illum; | |
633 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |