summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingssky.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-09-10 23:07:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-09-11 14:09:01 +0300
commit047eb16f4c8fdfb1826136db9ee2eed83cb95416 (patch)
treedd78346995ddc2a91d1e74f191a2fb53809b6e74 /indra/llinventory/llsettingssky.h
parentd6eafa1bdbcfa69d60d2d7340c331e34d6915500 (diff)
viewer#2529 Optimize updateGLVariablesForSettings
Intent is to eventually use only stored variables for everything. LLSD operations are far too expensive.
Diffstat (limited to 'indra/llinventory/llsettingssky.h')
-rw-r--r--indra/llinventory/llsettingssky.h67
1 files changed, 61 insertions, 6 deletions
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 40bb337a48..dc8e620f47 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -111,20 +111,23 @@ public:
LLSettingsSky(const LLSD &data);
virtual ~LLSettingsSky() { };
- virtual ptr_t buildClone() const = 0;
+ virtual ptr_t buildClone() = 0;
//---------------------------------------------------------------------
virtual std::string getSettingsType() const SETTINGS_OVERRIDE { return std::string("sky"); }
virtual LLSettingsType::type_e getSettingsTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_SKY; }
// Settings status
- virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE;
+ virtual void blend(LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE;
virtual void replaceSettings(LLSD settings) SETTINGS_OVERRIDE;
void replaceWithSky(LLSettingsSky::ptr_t pother);
static LLSD defaults(const LLSettingsBase::TrackPosition& position = 0.0f);
+ void loadValuesFromLLSD() override;
+ void saveValuesToLLSD() override;
+
F32 getPlanetRadius() const;
F32 getSkyBottomRadius() const;
F32 getSkyTopRadius() const;
@@ -306,7 +309,7 @@ public:
LLColor3 getSunlightColorClamped() const;
LLColor3 getAmbientColorClamped() const;
- virtual LLSettingsBase::ptr_t buildDerivedClone() const SETTINGS_OVERRIDE { return buildClone(); }
+ virtual LLSettingsBase::ptr_t buildDerivedClone() SETTINGS_OVERRIDE { return buildClone(); }
static LLUUID GetDefaultAssetId();
static LLUUID GetDefaultSunTextureId();
@@ -348,6 +351,12 @@ protected:
virtual stringset_t getSlerpKeys() const SETTINGS_OVERRIDE;
virtual stringset_t getSkipInterpolateKeys() const SETTINGS_OVERRIDE;
+ LLUUID mSunTextureId;
+ LLUUID mMoonTextureId;
+ LLUUID mCloudTextureId;
+ LLUUID mBloomTextureId;
+ LLUUID mRainbowTextureId;
+ LLUUID mHaloTextureId;
LLUUID mNextSunTextureId;
LLUUID mNextMoonTextureId;
LLUUID mNextCloudTextureId;
@@ -355,17 +364,63 @@ protected:
LLUUID mNextRainbowTextureId;
LLUUID mNextHaloTextureId;
+ bool mCanAutoAdjust;
+ F32 mReflectionProbeAmbiance;
+ F32 mSunScale;
+ LLQuaternion mSunRotation;
+ LLColor3 mSunlightColor;
+ F32 mStarBrightness;
+ F32 mMoonBrightness;
+ F32 mMoonScale;
+ LLQuaternion mMoonRotation;
+ F32 mMaxY;
+ LLColor3 mGlow;
+ F32 mGamma;
+ F32 mCloudVariance;
+ F32 mCloudShadow;
+ LLVector2 mScrollRate;
+ F32 mCloudScale;
+ LLColor3 mCloudPosDensity1;
+ LLColor3 mCloudPosDensity2;
+ LLColor3 mCloudColor;
+ LLSD mAbsorptionConfigs;
+ LLSD mMieConfigs;
+ LLSD mRayleighConfigs;
+ F32 mSunArcRadians;
+ F32 mSkyTopRadius;
+ F32 mSkyBottomRadius;
+ F32 mSkyMoistureLevel;
+ F32 mSkyDropletRadius;
+ F32 mSkyIceLevel;
+ F32 mPlanetRadius;
+
+ F32 mHazeHorizon;
+ F32 mHazeDensity;
+ F32 mDistanceMultiplier;
+ F32 mDensityMultiplier;
+ LLColor3 mBlueHorizon;
+ LLColor3 mBlueDensity;
+ LLColor3 mAmbientColor;
+
+ bool mLegacyHazeHorizon;
+ bool mLegacyHazeDensity;
+ bool mLegacyDistanceMultiplier;
+ bool mLegacyDensityMultiplier;
+ bool mLegacyBlueHorizon;
+ bool mLegacyBlueDensity;
+ bool mLegacyAmbientColor;
+
private:
static LLSD rayleighConfigDefault();
static LLSD absorptionConfigDefault();
static LLSD mieConfigDefault();
- LLColor3 getColor(const std::string& key, const LLColor3& default_value) const;
- F32 getFloat(const std::string& key, F32 default_value) const;
+ LLColor3 getColor(const std::string& key, const LLColor3& default_value);
+ F32 getFloat(const std::string& key, F32 default_value);
void calculateHeavenlyBodyPositions() const;
void calculateLightSettings() const;
- void clampColor(LLColor3& color, F32 gamma, const F32 scale = 1.0f) const;
+ static void clampColor(LLColor3& color, F32 gamma, const F32 scale = 1.0f);
mutable LLVector3 mSunDirection;
mutable LLVector3 mMoonDirection;