From 8890c3238ab4ae8bbf1bc123284f9c6d4db4f9d6 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 6 Feb 2019 16:42:23 -0800 Subject: 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. --- indra/llinventory/llsettingssky.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/llinventory/llsettingssky.cpp') 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() -- cgit v1.2.3 From 4952736a063b674f5a91904686920b11b0e04b69 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 7 Feb 2019 11:06:03 -0800 Subject: SL-10486 Use brighter moon texture for both default and blank moon texture ids in picker. --- indra/llinventory/llsettingssky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingssky.cpp') diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 2a503664ad..72a3c7b01c 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -140,7 +140,7 @@ const std::string LLSettingsSky::SETTING_SKY_ICE_LEVEL("ice_level"); const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("eb3a7080-831f-9f37-10f0-7b1f9ea4043c"); static const LLUUID DEFAULT_SUN_ID("32bfbcea-24b1-fb9d-1ef9-48a28a63730f"); // dataserver -static const LLUUID DEFAULT_MOON_ID("db13b827-7e6a-7ace-bed4-4419ee00984d"); // dataserver +static const LLUUID DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver static const LLUUID DEFAULT_CLOUD_ID("1dc1368f-e8fe-f02d-a08d-9d9f11c1af6b"); const std::string LLSettingsSky::SETTING_LEGACY_HAZE("legacy_haze"); -- cgit v1.2.3