summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-10-04 17:00:07 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-10-04 17:00:07 +0300
commit8acb87aaf32e6f27d2f8caba6178cdd7a80c2086 (patch)
treec475626b79dc76d070f23ed5c7ba2de4f6ae8e9e /indra
parent737a1552edc3d2947caf4f10c5cb25b0bc214833 (diff)
SL-9809 [EEP] Environment becomes dark after setting "Glow Size" to the maximum value
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lllegacyatmospherics.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp
index 04623c4452..0c4e5b48e8 100644
--- a/indra/newview/lllegacyatmospherics.cpp
+++ b/indra/newview/lllegacyatmospherics.cpp
@@ -333,8 +333,17 @@ void LLAtmospherics::calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars)
// temp2.x is 0 at the sun and increases away from sun
temp2.mV[0] = llmax(temp2.mV[0], .001f);
// Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.mV[0] *= glow.mV[0];
+
+ if (glow.mV[0] > 0) // don't pow(zero,negative value), glow from 0 to 2
+ {
// Higher glow.x gives dimmer glow (because next step is 1 / "angle")
+ temp2.mV[0] *= glow.mV[0];
+ }
+ else
+ {
+ temp2.mV[0] = F32_MIN;
+ }
+
temp2.mV[0] = pow(temp2.mV[0], glow.mV[2]);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function