summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-09 18:44:43 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-09 18:44:43 +0100
commitf8aac192378462b5824d28808ed84833e2cbfe0f (patch)
tree8b2cfff19afd6fce5e514471e59d3c1496653191 /indra/llinventory
parent8c4258009b09f16751437d0549067ab2950e725a (diff)
SL-1289
add cloud_variance control for randomized perturbance of clouds to break up tiling monotony
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp16
-rw-r--r--indra/llinventory/llsettingssky.h5
2 files changed, 20 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index dd3a76be31..5ef964af04 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -91,6 +91,7 @@ const std::string LLSettingsSky::SETTING_CLOUD_SCALE("cloud_scale");
const std::string LLSettingsSky::SETTING_CLOUD_SCROLL_RATE("cloud_scroll_rate");
const std::string LLSettingsSky::SETTING_CLOUD_SHADOW("cloud_shadow");
const std::string LLSettingsSky::SETTING_CLOUD_TEXTUREID("cloud_id");
+const std::string LLSettingsSky::SETTING_CLOUD_VARIANCE("cloud_variance");
const std::string LLSettingsSky::SETTING_DOME_OFFSET("dome_offset");
const std::string LLSettingsSky::SETTING_DOME_RADIUS("dome_radius");
@@ -539,6 +540,8 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
validation.push_back(Validator(SETTING_CLOUD_SHADOW, true, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
validation.push_back(Validator(SETTING_CLOUD_TEXTUREID, false, LLSD::TypeUUID));
+ validation.push_back(Validator(SETTING_CLOUD_VARIANCE, false, LLSD::TypeReal,
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
validation.push_back(Validator(SETTING_DOME_OFFSET, false, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
@@ -683,7 +686,8 @@ LLSD LLSettingsSky::defaults(const LLSettingsBase::TrackPosition& position)
dfltsetting[SETTING_CLOUD_SCALE] = LLSD::Real(0.4199);
dfltsetting[SETTING_CLOUD_SCROLL_RATE] = LLSDArray(0.0f)(0.0f);
dfltsetting[SETTING_CLOUD_SHADOW] = LLSD::Real(0.2699);
-
+ dfltsetting[SETTING_CLOUD_VARIANCE] = LLSD::Real(0.0);
+
dfltsetting[SETTING_DOME_OFFSET] = LLSD::Real(0.96f);
dfltsetting[SETTING_DOME_RADIUS] = LLSD::Real(15000.f);
dfltsetting[SETTING_GAMMA] = LLSD::Real(1.0);
@@ -1431,6 +1435,16 @@ void LLSettingsSky::setCloudShadow(F32 val)
setValue(SETTING_CLOUD_SHADOW, val);
}
+F32 LLSettingsSky::getCloudVariance() const
+{
+ return mSettings[SETTING_CLOUD_VARIANCE].asReal();
+}
+
+void LLSettingsSky::setCloudVariance(F32 val)
+{
+ setValue(SETTING_CLOUD_VARIANCE, val);
+}
+
F32 LLSettingsSky::getDomeOffset() const
{
//return mSettings[SETTING_DOME_OFFSET].asReal();
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 89dd6d20fd..796120ba03 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -57,6 +57,8 @@ public:
static const std::string SETTING_CLOUD_SCROLL_RATE;
static const std::string SETTING_CLOUD_SHADOW;
static const std::string SETTING_CLOUD_TEXTUREID;
+ static const std::string SETTING_CLOUD_VARIANCE;
+
static const std::string SETTING_DOME_OFFSET;
static const std::string SETTING_DOME_RADIUS;
static const std::string SETTING_GAMMA;
@@ -184,6 +186,9 @@ public:
F32 getCloudShadow() const;
void setCloudShadow(F32 val);
+ F32 getCloudVariance() const;
+ void setCloudVariance(F32 val);
+
F32 getDomeOffset() const;
F32 getDomeRadius() const;