diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-10-17 11:38:18 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-10-17 11:38:18 +0300 |
commit | 866f9ab17a893f2c10d2a4ee1797c7afb2eb12ce (patch) | |
tree | 59aad8920e22aa40edfd5a27582e790620b2e92f /indra | |
parent | d8ed800991feaa3264f36f8e62f054bf0fe4d448 (diff) |
division by zero protection
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllegacyatmospherics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 371bd1b7c2..b631e5498d 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -368,7 +368,7 @@ void LLAtmospherics::calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars) componentMultBy(vars.hazeColor, LLColor3::white - temp1); sunlight = vars.sunlight; - temp2.mV[1] = llmax(0.f, sun_norm[1] * 2.f); + temp2.mV[1] = llmax(F_APPROXIMATELY_ZERO, sun_norm[1] * 2.f); temp2.mV[1] = 1.f / temp2.mV[1]; componentMultBy(sunlight, componentExp((light_atten * -1.f) * temp2.mV[1])); |