summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-04-02 15:27:22 -0500
committerGitHub <noreply@github.com>2024-04-02 15:27:22 -0500
commit92efb16039619b8ac440cfc862f29b0f7c6c0fd6 (patch)
tree59157f10482d5791e3f86b8e609fd0cb98fc809b /indra/llinventory
parent422ab40704cdbf36cd28fa0a78d5941c9456c1ad (diff)
#854 Fix for skies that shouldn't be auto-adjusted getting auto-adjusted. (#1115)
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp28
-rw-r--r--indra/llinventory/llsettingssky.h9
2 files changed, 6 insertions, 31 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index c3cd7262fb..6688dadd3a 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -407,7 +407,6 @@ LLSettingsSky::LLSettingsSky(const LLSD &data) :
mNextRainbowTextureId(),
mNextHaloTextureId()
{
- mCanAutoAdjust = !data.has(SETTING_REFLECTION_PROBE_AMBIANCE);
}
LLSettingsSky::LLSettingsSky():
@@ -430,8 +429,6 @@ void LLSettingsSky::replaceSettings(LLSD settings)
mNextBloomTextureId.setNull();
mNextRainbowTextureId.setNull();
mNextHaloTextureId.setNull();
-
- mCanAutoAdjust = !settings.has(SETTING_REFLECTION_PROBE_AMBIANCE);
}
void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother)
@@ -444,7 +441,6 @@ void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother)
mNextBloomTextureId = pother->mNextBloomTextureId;
mNextRainbowTextureId = pother->mNextRainbowTextureId;
mNextHaloTextureId = pother->mNextHaloTextureId;
- mCanAutoAdjust = pother->mCanAutoAdjust;
}
void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
@@ -1146,7 +1142,6 @@ void LLSettingsSky::setSkyIceLevel(F32 ice_level)
void LLSettingsSky::setReflectionProbeAmbiance(F32 ambiance)
{
- mCanAutoAdjust = false; // we've now touched this sky in a "new" way, it can no longer auto adjust
setValue(SETTING_REFLECTION_PROBE_AMBIANCE, ambiance);
}
@@ -1448,24 +1443,6 @@ F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const
return mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
}
-F32 LLSettingsSky::getTotalReflectionProbeAmbiance(F32 cloud_shadow_scale, bool auto_adjust) const
-{
-#if 0
- // feed cloud shadow back into reflection probe ambiance to mimic pre-reflection-probe behavior
- // without brightening dark/interior spaces
- F32 probe_ambiance = getReflectionProbeAmbiance(auto_adjust);
-
- if (probe_ambiance > 0.f && probe_ambiance < 1.f)
- {
- probe_ambiance += (1.f - probe_ambiance) * getCloudShadow() * cloud_shadow_scale;
- }
-
- return probe_ambiance;
-#else
- return getReflectionProbeAmbiance(auto_adjust);
-#endif
-}
-
F32 LLSettingsSky::getSkyBottomRadius() const
{
return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
@@ -1810,3 +1787,8 @@ LLUUID LLSettingsSky::getNextBloomTextureId() const
return mNextBloomTextureId;
}
+// if true, this sky is a candidate for auto-adjustment
+bool LLSettingsSky::canAutoAdjust() const
+{
+ return !mSettings.has(SETTING_REFLECTION_PROBE_AMBIANCE);
+}
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 7ba7a9ba06..222ab040cb 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -139,10 +139,6 @@ public:
// auto_adjust - if true and canAutoAdjust() is true, return 1.0
F32 getReflectionProbeAmbiance(bool auto_adjust = false) const;
- // get the probe ambiance setting to use for rendering (adjusted by cloud shadow, aka cloud coverage)
- // auto_adjust - if true and canAutoAdjust() is true, return 1.0
- F32 getTotalReflectionProbeAmbiance(F32 cloud_shadow_scale, bool auto_adjust = false) const;
-
// Return first (only) profile layer represented in LLSD
LLSD getRayleighConfig() const;
LLSD getMieConfig() const;
@@ -340,7 +336,7 @@ public:
virtual void updateSettings() SETTINGS_OVERRIDE;
// if true, this sky is a candidate for auto-adjustment
- bool canAutoAdjust() const { return mCanAutoAdjust; }
+ bool canAutoAdjust() const;
protected:
static const std::string SETTING_LEGACY_EAST_ANGLE;
@@ -385,9 +381,6 @@ private:
mutable LLColor4 mTotalAmbient;
mutable LLColor4 mHazeColor;
- // if true, this sky is a candidate for auto adjustment
- bool mCanAutoAdjust = true;
-
typedef std::map<std::string, S32> mapNameToUniformId_t;
static mapNameToUniformId_t sNameToUniformMapping;