summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-14 07:57:35 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-14 07:57:35 -0700
commita984c5e66acbc0903cfdbd175e01c347bdb59cb7 (patch)
treeb84162668c0c1333b3f1b6cf5ade27d10d6ecff4 /indra/llinventory
parent041d92b6bd4212bafd51567a52b4e2147da3132a (diff)
parentb143aa96fcd6d16558464c98bcfd9984f7d29750 (diff)
Merge
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingsbase.cpp2
-rw-r--r--indra/llinventory/llsettingssky.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 7d7547ecb1..7f2b5d4597 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -389,7 +389,7 @@ bool LLSettingsBase::validate()
LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial)
{
- static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 32));
+ static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 63));
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
static Validator validateType(SETTING_TYPE, false, LLSD::TypeString);
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 8483778e63..45d034cb1f 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1276,8 +1276,10 @@ void LLSettingsSky::calculateLightSettings() const
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow;
//brightness of surface both sunlight and ambient
- mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
- mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance));
+ // reduce range to 0 - 1 before gamma correct to prevent clipping
+ // then restore to full 0 - 3 range before storage
+ mSunDiffuse = gammaCorrect(componentMult(sunlight * 0.33333f, light_transmittance)) * 3.0f;
+ mSunAmbient = gammaCorrect(componentMult(tmpAmbient * 0.33333f, light_transmittance)) * 3.0f;
F32 moon_brightness = getIsMoonUp() ? getMoonBrightness() : 0.001f;