summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingssky.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-06-13 17:46:53 +0800
committerErik Kundiman <erik@megapahit.org>2026-06-13 17:46:53 +0800
commitc4824e2afbf372b3c6d061db069b109199720a79 (patch)
treeeae8ce1cc56ef993518c4d03a2556aabd337cfff /indra/llinventory/llsettingssky.cpp
parent9a8c5a4c14416636e8b83f3df63fbf87216f5aaa (diff)
parent9858207a710735da909fe83ba681cfd6a8964155 (diff)
Merge tag 'Second_Life_Release#9858207a-26.3' into 26.3
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r--indra/llinventory/llsettingssky.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index c4efa1f8b2..1e5a2280e3 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -654,39 +654,14 @@ void LLSettingsSky::blend(LLSettingsBase::ptr_t &end, F64 blendf)
}
}
+ mHasLegacyHaze |= lerp_legacy_float(mHazeHorizon, mLegacyHazeHorizon, other->mHazeHorizon, other->mLegacyHazeHorizon, 0.19f, (F32)blendf);
mHasLegacyHaze |= lerp_legacy_float(mHazeDensity, mLegacyHazeDensity, other->mHazeDensity, other->mLegacyHazeDensity, 0.7f, (F32)blendf);
mHasLegacyHaze |= lerp_legacy_float(mDistanceMultiplier, mLegacyDistanceMultiplier, other->mDistanceMultiplier, other->mLegacyDistanceMultiplier, 0.8f, (F32)blendf);
+ mHasLegacyHaze |= lerp_legacy_float(mDensityMultiplier, mLegacyDensityMultiplier, other->mDensityMultiplier, other->mLegacyDensityMultiplier, 0.0001f, (F32)blendf);
mHasLegacyHaze |= lerp_legacy_color(mAmbientColor, mLegacyAmbientColor, other->mAmbientColor, other->mLegacyAmbientColor, LLColor3(0.25f, 0.25f, 0.25f), (F32)blendf);
+ mHasLegacyHaze |= lerp_legacy_color(mBlueHorizon, mLegacyBlueHorizon, other->mBlueHorizon, other->mLegacyBlueHorizon, LLColor3(0.4954f, 0.4954f, 0.6399f), (F32)blendf);
mHasLegacyHaze |= lerp_legacy_color(mBlueDensity, mLegacyBlueDensity, other->mBlueDensity, other->mLegacyBlueDensity, LLColor3(0.2447f, 0.4487f, 0.7599f), (F32)blendf);
- if (mLegacyHazeHorizon == mLegacyDensityMultiplier == mLegacyBlueHorizon)
- {
- // mHazeHorizon coupled with mDensityMultiplier, mDistanceMultiplier and
- // drastic blue horizon changes can result in a very bright sky during
- // the transition. Purpose of this code is to calculate a 'fake level'
- // and use it to even out brightness change.
- //
- // Example values that make lerp-based individual transition painfully bright:
- // Start: 3 Haze Horiz, 0.1 Density, 6.54 Distance, white ambient, white blue horizon
- // End: 0.03 Haze Horiz, 0.775 Density, 90.95 Distance, black ambient, black blue horizon
- F32 strt_level = mHazeHorizon * mDensityMultiplier * mBlueHorizon.length();
- F32 end_level = other->mHazeHorizon * other->mDensityMultiplier * other->mBlueHorizon.length();
- mHasLegacyHaze |= lerp_legacy_float(mHazeHorizon, mLegacyHazeHorizon, other->mHazeHorizon, other->mLegacyHazeHorizon, 0.19f, (F32)blendf);
- mHasLegacyHaze |= lerp_legacy_float(mDensityMultiplier, mLegacyDensityMultiplier, other->mDensityMultiplier, other->mLegacyDensityMultiplier, 0.0001f, (F32)blendf);
- mHasLegacyHaze |= lerp_legacy_color(mBlueHorizon, mLegacyBlueHorizon, other->mBlueHorizon, other->mLegacyBlueHorizon, LLColor3(0.4954f, 0.4954f, 0.6399f), (F32)blendf);
-
- // lerp the fake level instead of density multiplier to avoid brightening the sky too much.
- // This makes density multiplier non linear.
- F32 new_level = lerp(strt_level, end_level, (F32)blendf);
- mDensityMultiplier = new_level / (mHazeHorizon * mBlueHorizon.length());
- }
- else
- {
- // default values are used, so we should lerp settings independently
- mHasLegacyHaze |= lerp_legacy_float(mHazeHorizon, mLegacyHazeHorizon, other->mHazeHorizon, other->mLegacyHazeHorizon, 0.19f, (F32)blendf);
- mHasLegacyHaze |= lerp_legacy_float(mDensityMultiplier, mLegacyDensityMultiplier, other->mDensityMultiplier, other->mLegacyDensityMultiplier, 0.0001f, (F32)blendf);
- mHasLegacyHaze |= lerp_legacy_color(mBlueHorizon, mLegacyBlueHorizon, other->mBlueHorizon, other->mLegacyBlueHorizon, LLColor3(0.4954f, 0.4954f, 0.6399f), (F32)blendf);
- }
parammapping_t defaults = other->getParameterMap();
stringset_t skip = getSkipInterpolateKeys();
stringset_t slerps = getSlerpKeys();