summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-11-01 18:17:43 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-11-01 18:17:43 +0200
commit64db1f48206ead083661a3f9df93bff9b37074a8 (patch)
treee0cb15fe5a4226aae8c761cc38ab9a9a2bfcd544 /indra/llinventory
parent5e0e09ec895534ac66f93b50cfad4062402df61c (diff)
SL-9793 EEP Clouds vanish and reappear abruptly if one of textures is not set
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 088c183f70..9d839e88d0 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -459,11 +459,35 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
}
}
+ LLUUID cloud_noise_id = getCloudNoiseTextureId();
+ LLUUID cloud_noise_id_next = other->getCloudNoiseTextureId();
+ F64 cloud_shadow = 0;
+ if (!cloud_noise_id.isNull() && cloud_noise_id_next.isNull())
+ {
+ // If there is no cloud texture in destination, reduce coverage to imitate disappearance
+ // See LLDrawPoolWLSky::renderSkyClouds... we don't blend present texture with null
+ // Note: Probably can be done by shader
+ cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), (F64)0.f, blendf);
+ cloud_noise_id_next = cloud_noise_id;
+ }
+ else if (cloud_noise_id.isNull() && !cloud_noise_id_next.isNull())
+ {
+ // Source has no cloud texture, reduce initial coverage to imitate appearance
+ // use same texture as destination
+ cloud_shadow = lerp((F64)0.f, other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
+ setCloudNoiseTextureId(cloud_noise_id_next);
+ }
+ else
+ {
+ cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
+ }
+
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, other->getParameterMap(), blendf);
+ blenddata[SETTING_CLOUD_SHADOW] = LLSD::Real(cloud_shadow);
replaceSettings(blenddata);
mNextSunTextureId = other->getSunTextureId();
mNextMoonTextureId = other->getMoonTextureId();
- mNextCloudTextureId = other->getCloudNoiseTextureId();
+ mNextCloudTextureId = cloud_noise_id_next;
mNextBloomTextureId = other->getBloomTextureId();
mNextRainbowTextureId = other->getRainbowTextureId();
mNextHaloTextureId = other->getHaloTextureId();
@@ -486,6 +510,7 @@ LLSettingsSky::stringset_t LLSettingsSky::getSkipInterpolateKeys() const
skipSet.insert(SETTING_RAYLEIGH_CONFIG);
skipSet.insert(SETTING_MIE_CONFIG);
skipSet.insert(SETTING_ABSORPTION_CONFIG);
+ skipSet.insert(SETTING_CLOUD_SHADOW);
}
return skipSet;