summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-02-06 16:42:23 -0800
committerGraham Linden <graham@lindenlab.com>2019-02-06 16:42:23 -0800
commit8890c3238ab4ae8bbf1bc123284f9c6d4db4f9d6 (patch)
tree6d250b8114eb4d39a7c5810813a06d730665372b /indra/llinventory
parentf8171a909cb2a18fcca47f6a0317919ece802aef (diff)
SL-10478
Fix side-effects of having both sun and moon as potential directional light contributors. We pass an int to the shader indicating which to prefer instead of making per-pixel decisions and pass the moonlight color/di independently. Obsolete llsettingssky fade color which was unused elsewhere and cached for no reason.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp13
-rw-r--r--indra/llinventory/llsettingssky.h3
2 files changed, 3 insertions, 13 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 612c97168c..2a503664ad 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1238,12 +1238,6 @@ LLVector3 LLSettingsSky::getMoonDirection() const
return mMoonDirection;
}
-LLColor4U LLSettingsSky::getFadeColor() const
-{
- update();
- return mFadeColor;
-}
-
LLColor4 LLSettingsSky::getMoonAmbient() const
{
update();
@@ -1305,12 +1299,9 @@ void LLSettingsSky::calculateLightSettings() const
mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance) * 0.5);
- mMoonDiffuse = gammaCorrect(componentMult(LLColor3::white, light_transmittance));
- mMoonAmbient = gammaCorrect(componentMult(LLColor3::white, light_transmittance) * 0.5f);
+ mMoonDiffuse = gammaCorrect(componentMult(LLColor3::white, light_transmittance) * 0.5f);
+ mMoonAmbient = gammaCorrect(componentMult(LLColor3::white, light_transmittance) * 0.25f);
mTotalAmbient = mSunAmbient;
-
- mFadeColor = mTotalAmbient + (mSunDiffuse + mMoonDiffuse) * 0.5f;
- mFadeColor.setAlpha(0);
}
LLUUID LLSettingsSky::GetDefaultAssetId()
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 65c0f2c581..cd173a6b18 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -280,7 +280,7 @@ public:
LLVector3 getSunDirection() const;
LLVector3 getMoonDirection() const;
- LLColor4U getFadeColor() const;
+
LLColor4 getMoonAmbient() const;
LLColor3 getMoonDiffuse() const;
LLColor4 getSunAmbient() const;
@@ -347,7 +347,6 @@ private:
static const F32 DOME_RADIUS;
static const F32 DOME_OFFSET;
- mutable LLColor4U mFadeColor;
mutable LLColor4 mMoonAmbient;
mutable LLColor3 mMoonDiffuse;
mutable LLColor4 mSunAmbient;