From d7dd10b88bc3fda88f6528ecc5936e4889f019f3 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 30 Nov 2017 11:32:22 -0800 Subject: Split for viewer/simhost sync LLSD with simhost. --- indra/llinventory/llsettingswater.h | 227 ++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 indra/llinventory/llsettingswater.h (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h new file mode 100644 index 0000000000..5d6a482d56 --- /dev/null +++ b/indra/llinventory/llsettingswater.h @@ -0,0 +1,227 @@ +/** +* @file llsettingssky.h +* @author optional +* @brief A base class for asset based settings groups. +* +* $LicenseInfo:2011&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2017, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#ifndef LL_SETTINGS_WATER_H +#define LL_SETTINGS_WATER_H + +#include "llsettingsbase.h" + +class LLSettingsWater : public LLSettingsBase +{ +public: + static const std::string SETTING_BLUR_MULTIPILER; + static const std::string SETTING_FOG_COLOR; + static const std::string SETTING_FOG_DENSITY; + static const std::string SETTING_FOG_MOD; + static const std::string SETTING_FRESNEL_OFFSET; + static const std::string SETTING_FRESNEL_SCALE; + static const std::string SETTING_NORMAL_MAP; + static const std::string SETTING_NORMAL_SCALE; + static const std::string SETTING_SCALE_ABOVE; + static const std::string SETTING_SCALE_BELOW; + static const std::string SETTING_WAVE1_DIR; + static const std::string SETTING_WAVE2_DIR; + + static const LLUUID DEFAULT_WATER_NORMAL_ID; + + typedef boost::shared_ptr ptr_t; + + //--------------------------------------------------------------------- + LLSettingsWater(const LLSD &data); + virtual ~LLSettingsWater() { }; + + virtual ptr_t buildClone() = 0; + + //--------------------------------------------------------------------- + virtual std::string getSettingType() const { return std::string("water"); } + + // Settings status + virtual void blend(const LLSettingsBase::ptr_t &end, F32 blendf); + + static LLSD defaults(); + + //--------------------------------------------------------------------- + F32 getBlurMultiplier() const + { + return mSettings[SETTING_BLUR_MULTIPILER].asReal(); + } + + void setBlurMultiplier(F32 val) + { + setValue(SETTING_BLUR_MULTIPILER, val); + } + + LLColor3 getFogColor() const + { + return LLColor3(mSettings[SETTING_FOG_COLOR]); + } + + void setFogColor(LLColor3 val) + { + setValue(SETTING_FOG_COLOR, val); + } + + F32 getFogDensity() const + { + return mSettings[SETTING_FOG_DENSITY].asReal(); + } + + void setFogDensity(F32 val) + { + setValue(SETTING_FOG_DENSITY, val); + } + + F32 getFogMod() const + { + return mSettings[SETTING_FOG_MOD].asReal(); + } + + void setFogMod(F32 val) + { + setValue(SETTING_FOG_MOD, val); + } + + F32 getFresnelOffset() const + { + return mSettings[SETTING_FRESNEL_OFFSET].asReal(); + } + + void setFresnelOffset(F32 val) + { + setValue(SETTING_FRESNEL_OFFSET, val); + } + + F32 getFresnelScale() const + { + return mSettings[SETTING_FRESNEL_SCALE].asReal(); + } + + void setFresnelScale(F32 val) + { + setValue(SETTING_FRESNEL_SCALE, val); + } + + LLUUID getNormalMapID() const + { + return mSettings[SETTING_NORMAL_MAP].asUUID(); + } + + void setNormalMapID(LLUUID val) + { + setValue(SETTING_NORMAL_MAP, val); + } + + LLVector3 getNormalScale() const + { + return LLVector3(mSettings[SETTING_NORMAL_SCALE]); + } + + void setNormalScale(LLVector3 val) + { + setValue(SETTING_NORMAL_SCALE, val); + } + + F32 getScaleAbove() const + { + return mSettings[SETTING_SCALE_ABOVE].asReal(); + } + + void setScaleAbove(F32 val) + { + setValue(SETTING_SCALE_ABOVE, val); + } + + F32 getScaleBelow() const + { + return mSettings[SETTING_SCALE_BELOW].asReal(); + } + + void setScaleBelow(F32 val) + { + setValue(SETTING_SCALE_BELOW, val); + } + + LLVector2 getWave1Dir() const + { + return LLVector2(mSettings[SETTING_WAVE1_DIR]); + } + + void setWave1Dir(LLVector2 val) + { + setValue(SETTING_WAVE1_DIR, val); + } + + LLVector2 getWave2Dir() const + { + return LLVector2(mSettings[SETTING_WAVE2_DIR]); + } + + void setWave2Dir(LLVector2 val) + { + setValue(SETTING_WAVE2_DIR, val); + } + + //------------------------------------------- + LLVector4 getWaterPlane() const + { + update(); + return mWaterPlane; + } + + F32 getWaterFogKS() const + { + update(); + return mWaterFogKS; + } + +protected: + LLSettingsWater(); + + virtual validation_list_t getValidationList() const; + + static LLSD translateLegacySettings(LLSD legacy); + + LLVector4 mWaterPlane; + F32 mWaterFogKS; + +private: + static const std::string SETTING_LEGACY_BLUR_MULTIPILER; + static const std::string SETTING_LEGACY_FOG_COLOR; + static const std::string SETTING_LEGACY_FOG_DENSITY; + static const std::string SETTING_LEGACY_FOG_MOD; + static const std::string SETTING_LEGACY_FRESNEL_OFFSET; + static const std::string SETTING_LEGACY_FRESNEL_SCALE; + static const std::string SETTING_LEGACY_NORMAL_MAP; + static const std::string SETTING_LEGACY_NORMAL_SCALE; + static const std::string SETTING_LEGACY_SCALE_ABOVE; + static const std::string SETTING_LEGACY_SCALE_BELOW; + static const std::string SETTING_LEGACY_WAVE1_DIR; + static const std::string SETTING_LEGACY_WAVE2_DIR; + +}; + +#endif -- cgit v1.2.3 From 8211f57205f0008d8ffb9bfcd465ca26d906e19c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 8 Jan 2018 15:10:25 -0800 Subject: MAINT-7699: Deliver new settings to viewer via cap --- indra/llinventory/llsettingswater.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 5d6a482d56..d18caf68b1 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -60,7 +60,7 @@ public: virtual std::string getSettingType() const { return std::string("water"); } // Settings status - virtual void blend(const LLSettingsBase::ptr_t &end, F32 blendf); + virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf); static LLSD defaults(); @@ -199,16 +199,6 @@ public: } protected: - LLSettingsWater(); - - virtual validation_list_t getValidationList() const; - - static LLSD translateLegacySettings(LLSD legacy); - - LLVector4 mWaterPlane; - F32 mWaterFogKS; - -private: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; static const std::string SETTING_LEGACY_FOG_COLOR; static const std::string SETTING_LEGACY_FOG_DENSITY; @@ -222,6 +212,17 @@ private: static const std::string SETTING_LEGACY_WAVE1_DIR; static const std::string SETTING_LEGACY_WAVE2_DIR; + LLSettingsWater(); + + virtual validation_list_t getValidationList() const; + + static LLSD translateLegacySettings(LLSD legacy); + + LLVector4 mWaterPlane; + F32 mWaterFogKS; + +private: + }; #endif -- cgit v1.2.3 From 1b8c2b5ebbe0d42f147730bc9b6528fa8c6796ce Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 23 Jan 2018 08:54:34 -0800 Subject: MAINT-8052: Initial support for new EEP cap --- indra/llinventory/llsettingswater.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index d18caf68b1..94e5583fd7 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -198,6 +198,9 @@ public: return mWaterFogKS; } + virtual validation_list_t getValidationList() const; + static validation_list_t validationList(); + protected: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; static const std::string SETTING_LEGACY_FOG_COLOR; @@ -214,8 +217,6 @@ protected: LLSettingsWater(); - virtual validation_list_t getValidationList() const; - static LLSD translateLegacySettings(LLSD legacy); LLVector4 mWaterPlane; -- cgit v1.2.3 From 536aeb54a6130f3d1e20405c8f6cbd29201de26d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 23 Jan 2018 17:34:25 -0800 Subject: MAINT-8052: One more step towards parcel environments. --- indra/llinventory/llsettingswater.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 94e5583fd7..4c61e2a34c 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -201,6 +201,8 @@ public: virtual validation_list_t getValidationList() const; static validation_list_t validationList(); + static LLSD translateLegacySettings(LLSD legacy); + protected: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; static const std::string SETTING_LEGACY_FOG_COLOR; @@ -217,8 +219,6 @@ protected: LLSettingsWater(); - static LLSD translateLegacySettings(LLSD legacy); - LLVector4 mWaterPlane; F32 mWaterFogKS; -- cgit v1.2.3 From 7838189843ff3b9c800e458b2452943edbc202ea Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Feb 2018 17:27:56 -0800 Subject: boost->std & same level interp --- indra/llinventory/llsettingswater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 4c61e2a34c..4d206a1be0 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -48,7 +48,7 @@ public: static const LLUUID DEFAULT_WATER_NORMAL_ID; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; //--------------------------------------------------------------------- LLSettingsWater(const LLSD &data); -- cgit v1.2.3 From b766466b3013e39831bcfcaef5d1089c07202afb Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 26 Feb 2018 09:27:14 -0800 Subject: Added settings inventory object with subtype --- indra/llinventory/llsettingswater.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 4d206a1be0..16d5b2353a 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -57,7 +57,8 @@ public: virtual ptr_t buildClone() = 0; //--------------------------------------------------------------------- - virtual std::string getSettingType() const { return std::string("water"); } + virtual std::string getSettingType() const override { return std::string("water"); } + virtual LLSettingsType getSettingTypeValue() const override { return LLSettingsType::ST_WATER; } // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf); -- cgit v1.2.3 From 87f56754556d9a7a3cf23f35c4ac163447799f98 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 27 Feb 2018 10:46:21 -0800 Subject: XCode now gets cranky about override (or lack there of) --- indra/llinventory/llsettingswater.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 16d5b2353a..d4152acfa1 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -61,7 +61,7 @@ public: virtual LLSettingsType getSettingTypeValue() const override { return LLSettingsType::ST_WATER; } // Settings status - virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf); + virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override; static LLSD defaults(); @@ -199,7 +199,7 @@ public: return mWaterFogKS; } - virtual validation_list_t getValidationList() const; + virtual validation_list_t getValidationList() const override; static validation_list_t validationList(); static LLSD translateLegacySettings(LLSD legacy); -- cgit v1.2.3 From cbe4cac78cf48cb9144dc2f6c194585cff87a1ce Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Mar 2018 14:58:39 -0800 Subject: Settings type inventory objects and upload the assests. --- indra/llinventory/llsettingswater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index d4152acfa1..92190fa7b1 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -58,7 +58,7 @@ public: //--------------------------------------------------------------------- virtual std::string getSettingType() const override { return std::string("water"); } - virtual LLSettingsType getSettingTypeValue() const override { return LLSettingsType::ST_WATER; } + virtual LLSettingsType::type_e getSettingTypeValue() const override { return LLSettingsType::ST_WATER; } // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override; -- cgit v1.2.3 From 3925e37532476c526375fd76143b2b5e1dcce9b9 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 15 May 2018 17:17:51 -0700 Subject: Fix the blend code to record the amount of the blend and to store what is being blended towards. --- indra/llinventory/llsettingswater.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 92190fa7b1..64de4486ca 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -199,6 +199,13 @@ public: return mWaterFogKS; } + //------------------------------------------- + LLUUID getNextNormalMapID() const + { + return mNextNormalMapID; + } + + virtual validation_list_t getValidationList() const override; static validation_list_t validationList(); @@ -224,7 +231,7 @@ protected: F32 mWaterFogKS; private: - + LLUUID mNextNormalMapID; }; #endif -- cgit v1.2.3 From fa4ac065cb332c8c90fb59eeff0b983a1fd56691 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 24 May 2018 13:11:33 -0700 Subject: Enable sky changes with altitude. --- indra/llinventory/llsettingswater.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 64de4486ca..acae903e92 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -211,6 +211,8 @@ public: static LLSD translateLegacySettings(LLSD legacy); + virtual LLSettingsBase::ptr_t buildDerivedClone() override { return buildClone(); } + protected: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; static const std::string SETTING_LEGACY_FOG_COLOR; -- cgit v1.2.3 From 8cfdc07e790a557e881fadaa1b6258e5b16751f4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 23:32:30 +0100 Subject: Code cleanup and move to using typedefs of S64Seconds/F64Seconds for ease in sync w/ sim side which has not llunits types. --- indra/llinventory/llsettingswater.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index acae903e92..35e5b7bcf6 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -76,22 +76,22 @@ public: setValue(SETTING_BLUR_MULTIPILER, val); } - LLColor3 getFogColor() const + LLColor3 getWaterFogColor() const { return LLColor3(mSettings[SETTING_FOG_COLOR]); } - void setFogColor(LLColor3 val) + void setWaterFogColor(LLColor3 val) { setValue(SETTING_FOG_COLOR, val); } - F32 getFogDensity() const + F32 getWaterFogDensity() const { return mSettings[SETTING_FOG_DENSITY].asReal(); } - void setFogDensity(F32 val) + void setWaterFogDensity(F32 val) { setValue(SETTING_FOG_DENSITY, val); } -- cgit v1.2.3 From 2a613d7363c4e91a7258d4f0ea3971db1569e788 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 1 Jun 2018 16:24:36 -0700 Subject: Rework preset loading and context menu from inventory. --- indra/llinventory/llsettingswater.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index acae903e92..ca32a46430 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -48,6 +48,8 @@ public: static const LLUUID DEFAULT_WATER_NORMAL_ID; + static const LLUUID DEFAULT_ASSET_ID; + typedef std::shared_ptr ptr_t; //--------------------------------------------------------------------- -- cgit v1.2.3 From 7136956b90614bbd236be0e30231781c04346220 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Sat, 2 Jun 2018 23:28:48 +0100 Subject: Use more typedefs to simplify sync between viewer and sim env settings code. --- indra/llinventory/llsettingswater.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index a85a471bc5..92e9869e45 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -46,11 +46,7 @@ public: static const std::string SETTING_WAVE1_DIR; static const std::string SETTING_WAVE2_DIR; - static const LLUUID DEFAULT_WATER_NORMAL_ID; - - static const LLUUID DEFAULT_ASSET_ID; - - typedef std::shared_ptr ptr_t; + typedef PTR_NAMESPACE::shared_ptr ptr_t; //--------------------------------------------------------------------- LLSettingsWater(const LLSD &data); @@ -59,11 +55,11 @@ public: virtual ptr_t buildClone() = 0; //--------------------------------------------------------------------- - virtual std::string getSettingType() const override { return std::string("water"); } - virtual LLSettingsType::type_e getSettingTypeValue() const override { return LLSettingsType::ST_WATER; } + virtual std::string getSettingType() const SETTINGS_OVERRIDE { return std::string("water"); } + virtual LLSettingsType::type_e getSettingTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_WATER; } // Settings status - virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override; + virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; static LLSD defaults(); @@ -208,12 +204,15 @@ public: } - virtual validation_list_t getValidationList() const override; + virtual validation_list_t getValidationList() const SETTINGS_OVERRIDE; static validation_list_t validationList(); static LLSD translateLegacySettings(LLSD legacy); - virtual LLSettingsBase::ptr_t buildDerivedClone() override { return buildClone(); } + virtual LLSettingsBase::ptr_t buildDerivedClone() SETTINGS_OVERRIDE { return buildClone(); } + + static LLUUID GetDefaultAssetId(); + static LLUUID GetDefaultWaterNormalAssetId(); protected: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; @@ -231,11 +230,11 @@ protected: LLSettingsWater(); - LLVector4 mWaterPlane; - F32 mWaterFogKS; + LLVector4 mWaterPlane; + F32 mWaterFogKS; private: - LLUUID mNextNormalMapID; + LLUUID mNextNormalMapID; }; #endif -- cgit v1.2.3 From 8365945f8af6e27e7180b40aae79f210f99bb7c8 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 8 Jun 2018 16:40:01 -0700 Subject: Settings inventory picker. --- indra/llinventory/llsettingswater.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 92e9869e45..19761f6f07 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -55,8 +55,8 @@ public: virtual ptr_t buildClone() = 0; //--------------------------------------------------------------------- - virtual std::string getSettingType() const SETTINGS_OVERRIDE { return std::string("water"); } - virtual LLSettingsType::type_e getSettingTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_WATER; } + virtual std::string getSettingsType() const SETTINGS_OVERRIDE { return std::string("water"); } + virtual LLSettingsType::type_e getSettingsTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_WATER; } // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; -- cgit v1.2.3 From 34865c4bb5cd12219606f44748159fe7cbeea264 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 13 Jun 2018 00:51:39 +0100 Subject: Mods to hook up water settings to water normals for rendering with support for current to next blending. Modify LLSettingsFoo::buildDefaultFoo to use a static and avoid re-validation of default sky/water/daycycle settings. Remove all references to gSun/MoonTextureId globals (they should come from sky settings now). --- indra/llinventory/llsettingswater.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 19761f6f07..9d006d492d 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -39,6 +39,7 @@ public: static const std::string SETTING_FOG_MOD; static const std::string SETTING_FRESNEL_OFFSET; static const std::string SETTING_FRESNEL_SCALE; + static const std::string SETTING_TRANSPARENT_TEXTURE; static const std::string SETTING_NORMAL_MAP; static const std::string SETTING_NORMAL_SCALE; static const std::string SETTING_SCALE_ABOVE; @@ -124,6 +125,16 @@ public: setValue(SETTING_FRESNEL_SCALE, val); } + LLUUID getTransparentTextureID() const + { + return mSettings[SETTING_TRANSPARENT_TEXTURE].asUUID(); + } + + void setTransparentTextureID(LLUUID val) + { + setValue(SETTING_TRANSPARENT_TEXTURE, val); + } + LLUUID getNormalMapID() const { return mSettings[SETTING_NORMAL_MAP].asUUID(); @@ -203,6 +214,10 @@ public: return mNextNormalMapID; } + LLUUID getNextTransparentTextureID() const + { + return mNextTransparentTextureID; + } virtual validation_list_t getValidationList() const SETTINGS_OVERRIDE; static validation_list_t validationList(); @@ -213,6 +228,8 @@ public: static LLUUID GetDefaultAssetId(); static LLUUID GetDefaultWaterNormalAssetId(); + static LLUUID GetDefaultTransparentTextureAssetId(); + static LLUUID GetDefaultOpaqueTextureAssetId(); protected: static const std::string SETTING_LEGACY_BLUR_MULTIPILER; @@ -234,6 +251,7 @@ protected: F32 mWaterFogKS; private: + LLUUID mNextTransparentTextureID; LLUUID mNextNormalMapID; }; -- cgit v1.2.3 From 66d78ce1c73d5da3bc5bc39fe0196a9f82040105 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 15 Jun 2018 21:15:02 +0100 Subject: Make water and sky defaults take a position value to allow for default daycycle w/ multiple frames. Make default daycycle add 8 frames at 0, 0.125, 0.25 etc Merge over server-side bugfixes. Eliminate extraneous dirty bits in sky settings. --- indra/llinventory/llsettingswater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 9d006d492d..83d54da6a5 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -62,7 +62,7 @@ public: // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; - static LLSD defaults(); + static LLSD defaults(const LLSettingsBase::TrackPosition& position = 0.0f); //--------------------------------------------------------------------- F32 getBlurMultiplier() const -- cgit v1.2.3 From 939174416453a46a4a415f37ae642e5508c05787 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 16 Jul 2018 16:49:49 -0700 Subject: Add default and wellknown asset ids. --- indra/llinventory/llsettingswater.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 83d54da6a5..b525912898 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -47,6 +47,8 @@ public: static const std::string SETTING_WAVE1_DIR; static const std::string SETTING_WAVE2_DIR; + static const LLUUID DEFAULT_ASSET_ID; + typedef PTR_NAMESPACE::shared_ptr ptr_t; //--------------------------------------------------------------------- -- cgit v1.2.3 From 5ddd9d0c977bea070008baefdb452e808077f98c Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 16 Aug 2018 21:38:49 +0100 Subject: Make settings vfuncs use SETTINGS_OVERRIDE macro (override keyword in viewer codebase) to fix OS X compilation. Mark cloning funcs and derived class overrides as const. --- indra/llinventory/llsettingswater.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index b525912898..b33b082bbf 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -55,7 +55,7 @@ public: LLSettingsWater(const LLSD &data); virtual ~LLSettingsWater() { }; - virtual ptr_t buildClone() = 0; + virtual ptr_t buildClone() const = 0; //--------------------------------------------------------------------- virtual std::string getSettingsType() const SETTINGS_OVERRIDE { return std::string("water"); } @@ -226,7 +226,7 @@ public: static LLSD translateLegacySettings(LLSD legacy); - virtual LLSettingsBase::ptr_t buildDerivedClone() SETTINGS_OVERRIDE { return buildClone(); } + virtual LLSettingsBase::ptr_t buildDerivedClone() const SETTINGS_OVERRIDE { return buildClone(); } static LLUUID GetDefaultAssetId(); static LLUUID GetDefaultWaterNormalAssetId(); -- cgit v1.2.3 From 94c24b8713b72b6ce52637644ff18b234a3a400a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 23 Aug 2018 20:14:15 +0300 Subject: MAINT-8944 Fix frame transition's images --- indra/llinventory/llsettingswater.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index b33b082bbf..11d7150ba9 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -64,6 +64,8 @@ public: // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; + virtual void replaceSettings(LLSD settings) SETTINGS_OVERRIDE; + static LLSD defaults(const LLSettingsBase::TrackPosition& position = 0.0f); //--------------------------------------------------------------------- -- cgit v1.2.3 From d452fd77eff53c031c74301dd44a35edce6da95b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 30 Aug 2018 21:37:10 +0100 Subject: MAINT-9007 fix management of water plane and fog Ks shader uniforms --- indra/llinventory/llsettingswater.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 11d7150ba9..06ee8e68bc 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -199,19 +199,6 @@ public: setValue(SETTING_WAVE2_DIR, val); } - //------------------------------------------- - LLVector4 getWaterPlane() const - { - update(); - return mWaterPlane; - } - - F32 getWaterFogKS() const - { - update(); - return mWaterFogKS; - } - //------------------------------------------- LLUUID getNextNormalMapID() const { @@ -251,9 +238,6 @@ protected: LLSettingsWater(); - LLVector4 mWaterPlane; - F32 mWaterFogKS; - private: LLUUID mNextTransparentTextureID; LLUUID mNextNormalMapID; -- cgit v1.2.3 From 79d33f9d19a0c6e5ed34ffbd01a31cb2625e1ecc Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 10 Oct 2018 18:44:03 +0100 Subject: Fix names of WATER_BLUR_MULTIPILER. Give wave direction uniforms more meaningful names in shaders. Add comments on glow size/focus conversions for clarity. --- indra/llinventory/llsettingswater.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 06ee8e68bc..009a72eb24 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -33,7 +33,7 @@ class LLSettingsWater : public LLSettingsBase { public: - static const std::string SETTING_BLUR_MULTIPILER; + static const std::string SETTING_BLUR_MULTIPLIER; static const std::string SETTING_FOG_COLOR; static const std::string SETTING_FOG_DENSITY; static const std::string SETTING_FOG_MOD; @@ -71,12 +71,12 @@ public: //--------------------------------------------------------------------- F32 getBlurMultiplier() const { - return mSettings[SETTING_BLUR_MULTIPILER].asReal(); + return mSettings[SETTING_BLUR_MULTIPLIER].asReal(); } void setBlurMultiplier(F32 val) { - setValue(SETTING_BLUR_MULTIPILER, val); + setValue(SETTING_BLUR_MULTIPLIER, val); } LLColor3 getWaterFogColor() const @@ -223,7 +223,7 @@ public: static LLUUID GetDefaultOpaqueTextureAssetId(); protected: - static const std::string SETTING_LEGACY_BLUR_MULTIPILER; + static const std::string SETTING_LEGACY_BLUR_MULTIPLIER; static const std::string SETTING_LEGACY_FOG_COLOR; static const std::string SETTING_LEGACY_FOG_DENSITY; static const std::string SETTING_LEGACY_FOG_MOD; -- cgit v1.2.3 From 70ac8d9fa7049891ed1b65f68f112127dfb5f5f7 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 12 Dec 2018 14:07:23 -0800 Subject: SL-10238: Viewer spport for push notifications from the simulator contaiting partial groups of settings. Blend these settings into the current environment. --- indra/llinventory/llsettingswater.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 009a72eb24..118c515743 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -65,6 +65,7 @@ public: virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; virtual void replaceSettings(LLSD settings) SETTINGS_OVERRIDE; + void replaceWithWater(LLSettingsWater::ptr_t other); static LLSD defaults(const LLSettingsBase::TrackPosition& position = 0.0f); -- cgit v1.2.3 From b465a5bf6f4f63026ff66bfee4671584c47c4119 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 Jan 2019 16:53:14 -0800 Subject: SL-10387: Inject individual settings. Still freezes parcel/region settings. --- indra/llinventory/llsettingswater.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 118c515743..9998f64fd6 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -239,9 +239,9 @@ protected: LLSettingsWater(); -private: LLUUID mNextTransparentTextureID; LLUUID mNextNormalMapID; + }; #endif -- cgit v1.2.3 From 65927e0a76aaf8ff4dc268acdb12007265ff3a14 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 13 Feb 2019 13:09:14 -0800 Subject: SL-10181, SL-10546 Fix distortion map rendering in deferred mode not including underwater fog effects. Fix distortion map rendering not including post-deferred content at all. Fix distortion map rendering not including anything but sky when camera is underwater. Update sun_up_factor/sunmoon_glow_factor uniforms even when sun disc isn't in use. --- indra/llinventory/llsettingswater.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llinventory/llsettingswater.h') diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 9998f64fd6..e0bfd29f2d 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -95,6 +95,8 @@ public: return mSettings[SETTING_FOG_DENSITY].asReal(); } + F32 getModifiedWaterFogDensity(bool underwater) const; + void setWaterFogDensity(F32 val) { setValue(SETTING_FOG_DENSITY, val); -- cgit v1.2.3