summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingsbase.h2
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp1
-rw-r--r--indra/llinventory/llsettingssky.cpp8
-rw-r--r--indra/llinventory/llsettingssky.h2
-rw-r--r--indra/llinventory/llsettingswater.cpp16
-rw-r--r--indra/llinventory/llsettingswater.h18
6 files changed, 45 insertions, 2 deletions
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index f0d104ff53..f2fa78e41f 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -112,7 +112,7 @@ public:
}
- inline void replaceSettings(LLSD settings)
+ virtual void replaceSettings(LLSD settings)
{
mSettings = settings;
mBlendedFactor = 0.0;
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 009d7b06f2..51bc6b0e54 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -37,6 +37,7 @@
#include "llsettingswater.h"
#include "llframetimer.h"
+
//=========================================================================
namespace
{
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index db574f2eec..c25f9a5b2c 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -382,8 +382,16 @@ LLSettingsSky::LLSettingsSky():
{
}
+void LLSettingsSky::replaceSettings(LLSD settings)
+{
+ LLSettingsBase::replaceSettings(settings);
+
+}
+
void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
{
+ llassert(getSettingsType() == end->getSettingsType());
+
LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast<LLSettingsSky>(end);
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index a557080744..e6783f6694 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -103,6 +103,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();
F32 getPlanetRadius() const;
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index ba147baed7..16281e23cc 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -47,6 +47,7 @@ const std::string LLSettingsWater::SETTING_FOG_DENSITY("water_fog_density");
const std::string LLSettingsWater::SETTING_FOG_MOD("underwater_fog_mod");
const std::string LLSettingsWater::SETTING_FRESNEL_OFFSET("fresnel_offset");
const std::string LLSettingsWater::SETTING_FRESNEL_SCALE("fresnel_scale");
+const std::string LLSettingsWater::SETTING_TRANSPARENT_TEXTURE("transparent_texture");
const std::string LLSettingsWater::SETTING_NORMAL_MAP("normal_map");
const std::string LLSettingsWater::SETTING_NORMAL_SCALE("normal_scale");
const std::string LLSettingsWater::SETTING_SCALE_ABOVE("scale_above");
@@ -69,6 +70,8 @@ const std::string LLSettingsWater::SETTING_LEGACY_WAVE2_DIR("wave2Dir");
// *LAPRAS* Change when Agni
static const LLUUID DEFAULT_ASSET_ID("ce4cfe94-700a-292c-7c22-a2d9201bd661");
+static const LLUUID DEFAULT_TRANSPARENT_WATER_TEXTURE("2bfd3884-7e27-69b9-ba3a-3e673f680004");
+static const LLUUID DEFAULT_OPAQUE_WATER_TEXTURE("43c32285-d658-1793-c123-bf86315de055");
//=========================================================================
LLSettingsWater::LLSettingsWater(const LLSD &data) :
@@ -95,7 +98,8 @@ LLSD LLSettingsWater::defaults()
dfltsetting[SETTING_FOG_MOD] = LLSD::Real(0.25f);
dfltsetting[SETTING_FRESNEL_OFFSET] = LLSD::Real(0.5f);
dfltsetting[SETTING_FRESNEL_SCALE] = LLSD::Real(0.3999);
- dfltsetting[SETTING_NORMAL_MAP] = LLSD::UUID(DEFAULT_WATER_NORMAL);
+ dfltsetting[SETTING_TRANSPARENT_TEXTURE] = GetDefaultTransparentTextureAssetId();
+ dfltsetting[SETTING_NORMAL_MAP] = GetDefaultWaterNormalAssetId();
dfltsetting[SETTING_NORMAL_SCALE] = LLVector3(2.0f, 2.0f, 2.0f).getValue();
dfltsetting[SETTING_SCALE_ABOVE] = LLSD::Real(0.0299f);
dfltsetting[SETTING_SCALE_BELOW] = LLSD::Real(0.2000f);
@@ -171,6 +175,7 @@ void LLSettingsWater::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
replaceSettings(blenddata);
setBlendFactor(blendf);
mNextNormalMapID = other->getNormalMapID();
+ mNextTransparentTextureID = other->getTransparentTextureID();
}
LLSettingsWater::validation_list_t LLSettingsWater::getValidationList() const
@@ -234,3 +239,12 @@ LLUUID LLSettingsWater::GetDefaultWaterNormalAssetId()
return DEFAULT_WATER_NORMAL;
}
+LLUUID LLSettingsWater::GetDefaultTransparentTextureAssetId()
+{
+ return DEFAULT_TRANSPARENT_WATER_TEXTURE;
+}
+
+LLUUID LLSettingsWater::GetDefaultOpaqueTextureAssetId()
+{
+ return DEFAULT_OPAQUE_WATER_TEXTURE;
+}
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;
};