SL-9793 EEP Clouds vanish and reappear abruptly if one of textures is not set
parent
5e0e09ec89
commit
64db1f4820
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
// newview
|
||||
#include "llagent.h"
|
||||
#include "llappviewer.h" //gDisconected
|
||||
#include "llparcel.h"
|
||||
#include "llflyoutcombobtn.h" //Todo: make a proper UI element/button/panel instead
|
||||
#include "llregioninfomodel.h"
|
||||
|
|
@ -1523,17 +1524,19 @@ void LLFloaterEditExtDayCycle::stopPlay()
|
|||
//static
|
||||
void LLFloaterEditExtDayCycle::onIdlePlay(void* user_data)
|
||||
{
|
||||
LLFloaterEditExtDayCycle* self = (LLFloaterEditExtDayCycle*)user_data;
|
||||
if (!gDisconnected)
|
||||
{
|
||||
LLFloaterEditExtDayCycle* self = (LLFloaterEditExtDayCycle*)user_data;
|
||||
|
||||
F32 prcnt_played = self->mPlayTimer.getElapsedTimeF32() / DAY_CYCLE_PLAY_TIME_SECONDS;
|
||||
F32 new_frame = fmod(self->mPlayStartFrame + prcnt_played, 1.f);
|
||||
|
||||
self->mTimeSlider->setCurSliderValue(new_frame); // will do the rounding
|
||||
self->mSkyBlender->setPosition(new_frame);
|
||||
self->mWaterBlender->setPosition(new_frame);
|
||||
self->synchronizeTabs();
|
||||
self->updateTimeAndLabel();
|
||||
F32 prcnt_played = self->mPlayTimer.getElapsedTimeF32() / DAY_CYCLE_PLAY_TIME_SECONDS;
|
||||
F32 new_frame = fmod(self->mPlayStartFrame + prcnt_played, 1.f);
|
||||
|
||||
self->mTimeSlider->setCurSliderValue(new_frame); // will do the rounding
|
||||
self->mSkyBlender->setPosition(new_frame);
|
||||
self->mWaterBlender->setPosition(new_frame);
|
||||
self->synchronizeTabs();
|
||||
self->updateTimeAndLabel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,7 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex
|
|||
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
|
||||
|
||||
LLUUID moon_tex = moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture;
|
||||
LLUUID moon_tex_next = moon_texture_next.isNull() ? (moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture) : moon_texture_next;
|
||||
LLUUID moon_tex_next = moon_texture_next.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture_next;
|
||||
|
||||
mMoonTexturep[0] = moon_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
|
||||
mMoonTexturep[1] = moon_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
|
||||
|
|
@ -1026,10 +1026,8 @@ void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLU
|
|||
{
|
||||
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
|
||||
|
||||
LLUUID cloud_noise_tex_next = cloud_noise_texture_next.isNull() ? (cloud_noise_texture.isNull() ? LLUUID() : cloud_noise_texture) : cloud_noise_texture_next;
|
||||
|
||||
mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
|
||||
mCloudNoiseTexturep[1] = cloud_noise_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
|
||||
mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
|
||||
|
||||
if (mCloudNoiseTexturep[0])
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue