diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-10-29 18:18:20 +0200 |
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-10-29 18:18:20 +0200 |
| commit | 659d14504f6ab4ad283efe4ecd950a4483e1498f (patch) | |
| tree | e0a33e4ecf7eac065b8cbcf75f33c996001c03cc /indra/llinventory/llsettingssky.cpp | |
| parent | e9faa3cce8897af2a4303538672e2262ed39520a (diff) | |
SL-1476 EEP Better shader resets and transitions
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
| -rw-r--r-- | indra/llinventory/llsettingssky.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index e2fd681039..14318a2a26 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -434,7 +434,14 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf) LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast<LLSettingsSky>(end); if (other) { - LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf); + if (!mSettings.has(SETTING_LEGACY_HAZE) && !mSettings[SETTING_LEGACY_HAZE].has(SETTING_AMBIENT)) + { + // Special case since SETTING_AMBIENT is both in outer and legacy maps, we prioritize legacy one + // see getAmbientColor() + setAmbientColor(getAmbientColor()); + } + + LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, other->getParameterMap(), blendf); replaceSettings(blenddata); mNextSunTextureId = other->getSunTextureId(); mNextMoonTextureId = other->getMoonTextureId(); @@ -945,6 +952,7 @@ LLVector3 LLSettingsSky::getLightDirection() const LLColor3 LLSettingsSky::getAmbientColor() const { + // Todo: this causes complications, preferably to get rid of this duality if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(SETTING_AMBIENT)) { return LLColor3(mSettings[SETTING_LEGACY_HAZE][SETTING_AMBIENT]); |
