summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-15 08:13:04 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-15 08:13:04 -0700
commita10ec81e82d79bd79d5b058fda1b370073bfb480 (patch)
treea6e7f5be307197ace5b0a58429a99d2ecfd55dac /indra/llinventory
parent7021c7a8db9610e0d1866c2c4cbc644e2243367e (diff)
SL-10743, SL-10744
Don't step on SUNLIGHT_COLOR uniform w/ syncLightState competing set. Put drawpool alpha render loop lighting setup changes as they were (this will give back some performance and possibly require reopening 10566).
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 744c5853e4..f1bea326c1 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1281,19 +1281,18 @@ void LLSettingsSky::calculateLightSettings() const
// and vary_sunlight will work properly with moon light
F32 lighty = lightnorm[1];
-
- lighty = llmax(0.f, lighty);
- if(lighty > 0.f)
+ if(fabs(lighty) > 0.001f)
{
lighty = 1.f / lighty;
}
+ lighty = llmax(0.001f, lighty);
componentMultBy(sunlight, componentExp((light_atten * -1.f) * lighty));
//increase ambient when there are more clouds
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow * 0.5f;
//brightness of surface both sunlight and ambient
- mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
+ mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance) * 0.5);
mMoonDiffuse = gammaCorrect(componentMult(LLColor3::white, light_transmittance) * 0.5f);