summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-07 16:32:34 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-07 16:32:34 -0700
commit989de25f189276d586d5c7077e505bc697fe4112 (patch)
tree8994d26f8bb74e818f8d52b09956b60900d1dd04 /indra/llinventory
parentd3cf82969a6bf63585eba58d50223fec5e32a502 (diff)
SL-11086
Re-fix sun/moon glow factor and make it depend on moon brightness. Make cloud shaders use sunlight color exclusively for consistency when moon is up or down.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index def492c203..cfca2d0d78 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -953,21 +953,8 @@ void LLSettingsSky::updateSettings()
F32 LLSettingsSky::getSunMoonGlowFactor() const
{
- // sun glow at full iff moon is not up
- if (getIsSunUp())
- {
- if (!getIsMoonUp())
- {
- return 1.0f;
- }
- }
-
- if (getIsMoonUp())
- {
- return 0.25f;
- }
-
- return 0.0f;
+ return getIsSunUp() ? 1.0f :
+ getIsMoonUp() ? getMoonBrightness() * 0.25 : 0.0f;
}
bool LLSettingsSky::getIsSunUp() const
@@ -1302,7 +1289,7 @@ void LLSettingsSky::calculateLightSettings() const
mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness);
mMoonAmbient = gammaCorrect(componentMult(moonlight_b, light_transmittance) * 0.0125f);
- mTotalAmbient = mSunAmbient + mMoonAmbient;
+ mTotalAmbient = mSunAmbient;
}
LLUUID LLSettingsSky::GetDefaultAssetId()