summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-10-17 21:17:00 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-10-17 21:17:00 +0300
commit44cdf00bff2669004d0259637eddb6d461cc1a3b (patch)
tree3b51fddeb3e91835977ae3496f130cdc3c6da662 /indra/newview/llenvironment.cpp
parent26806a77702ab0e1395cc37c64d88899771ad1b0 (diff)
SL-1476 EEP parcel transition inconsistencies
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp48
1 files changed, 45 insertions, 3 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 1bc35b44bb..5e7e9937cd 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -888,9 +888,6 @@ void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLS
bool found_in_settings = psetting->mSettings.has(it.first);
bool found_in_legacy_settings = !found_in_settings && psetting->mSettings.has(LLSettingsSky::SETTING_LEGACY_HAZE) && psetting->mSettings[LLSettingsSky::SETTING_LEGACY_HAZE].has(it.first);
- if (!found_in_settings && !found_in_legacy_settings)
- continue;
-
if (found_in_settings)
{
value = psetting->mSettings[it.first];
@@ -899,6 +896,51 @@ void LLEnvironment::updateGLVariablesForSettings(LLGLSLShader *shader, const LLS
{
value = psetting->mSettings[LLSettingsSky::SETTING_LEGACY_HAZE][it.first];
}
+ else if (psetting->getSettingsType() == "sky")
+ {
+ // Legacy atmospherics is a special case,
+ // these values either have non zero defaults when they are not present
+ // in LLSD or need to be acounted for (reset) even if they are not present
+ // Todo: consider better options, for example make LLSettingsSky init these options
+ // Todo: we should reset shaders for all missing fields, not just these ones
+ LLSettingsSky::ptr_t skyp = std::static_pointer_cast<LLSettingsSky>(psetting);
+ if (it.first == LLSettingsSky::SETTING_BLUE_DENSITY)
+ {
+ value = skyp->getBlueDensity().getValue();
+ }
+ else if (it.first == LLSettingsSky::SETTING_BLUE_HORIZON)
+ {
+ value = skyp->getBlueHorizon().getValue();
+ }
+ else if (it.first == LLSettingsSky::SETTING_DENSITY_MULTIPLIER)
+ {
+ value = skyp->getDensityMultiplier();
+ }
+ else if (it.first == LLSettingsSky::SETTING_DISTANCE_MULTIPLIER)
+ {
+ value = skyp->getDistanceMultiplier();
+ }
+ else if (it.first == LLSettingsSky::SETTING_HAZE_DENSITY)
+ {
+ value = skyp->getHazeDensity();
+ }
+ else if (it.first == LLSettingsSky::SETTING_HAZE_HORIZON)
+ {
+ value = skyp->getHazeHorizon();
+ }
+ else if (it.first == LLSettingsSky::SETTING_AMBIENT)
+ {
+ value = skyp->getAmbientColor().getValue();
+ }
+ else
+ {
+ continue;
+ }
+ }
+ else
+ {
+ continue;
+ }
LLSD::Type setting_type = value.type();
stop_glerror();