summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-03 08:47:13 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-03 08:47:13 -0700
commit906b0be675e5467665f65180924e6117700b4cbb (patch)
tree1974fe65c87890c6c2711f82a20088184c931b58 /indra/llinventory
parentc4032528aff8ef1938e897ec583bbf25a3e713e1 (diff)
SL-11087, SL-11086, SL-11092
Fix sun/moon glow factor bustage. Make darkness an option. Fix moon fade shader logic getting confused when sun was below horizon.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index aa26cd8054..a090a7be32 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1292,15 +1292,15 @@ void LLSettingsSky::calculateLightSettings() const
mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance));
- F32 moon_brightness = getMoonBrightness();
+ F32 moon_brightness = getIsMoonUp() ? getMoonBrightness() : 0.001f;
- LLColor3 moonlight_a(0.66, 0.66, 0.66);
- LLColor3 moonlight_b(0.66, 0.66, 1.0);
+ LLColor3 moonlight_a(0.45, 0.45, 0.66);
+ LLColor3 moonlight_b(0.33, 0.33, 1.0);
LLColor3 moonlight = lerp(moonlight_b, moonlight_a, moon_brightness);
componentMultBy(moonlight, componentExp((light_atten * -1.f) * lighty));
- mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness * 0.25f);
+ mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness);
mMoonAmbient = gammaCorrect(componentMult(moonlight_b, light_transmittance) * 0.0125f);
mTotalAmbient = mSunAmbient + mMoonAmbient;
}