summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingssky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-08-27 12:49:18 -0700
committerGraham Linden <graham@lindenlab.com>2019-08-27 12:49:18 -0700
commitad26896a1086536cf47d3cb0041b0410aebf2119 (patch)
tree66cbe552b9ea2d9a0992df0a63ffceacc504b866 /indra/llinventory/llsettingssky.cpp
parentb660db7324387e2fcc55312e2c4f05897ca2c0eb (diff)
SL-11055
Remedy cloud_shadow and hack halving being done twice to ambient in some cases (i.e. artificial dimunition of necessary bullshit factor).
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r--indra/llinventory/llsettingssky.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 9bbeb00efe..c4ce3af157 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1326,26 +1326,13 @@ void LLSettingsSky::calculateLightSettings() const
componentMultBy(sunlight, componentExp((light_atten * -1.f) * lighty));
componentMultBy(sunlight, light_transmittance);
- //F32 max_color = llmax(sunlight.mV[0], sunlight.mV[1], sunlight.mV[2]);
- //if (max_color > 1.0f)
- //{
- // sunlight *= 1.0f/max_color;
- //}
-
//increase ambient when there are more clouds
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow * 0.5;
- componentMultBy(tmpAmbient, light_transmittance);
-
- //tmpAmbient = LLColor3::clamp(tmpAmbient, getGamma(), 1.0f);
- //max_color = llmax(tmpAmbient.mV[0], tmpAmbient.mV[1], tmpAmbient.mV[2]);
- //if (max_color > 1.0f)
- //{
- // tmpAmbient *= 1.0f/max_color;
- //}
//brightness of surface both sunlight and ambient
mSunDiffuse = sunlight;
mSunAmbient = tmpAmbient;
+
F32 haze_horizon = getHazeHorizon();
sunlight *= 1.0 - cloud_shadow;
@@ -1360,12 +1347,11 @@ void LLSettingsSky::calculateLightSettings() const
LLColor3 moonlight_b(0.66, 0.66, 1.2); // scotopic ambient value
componentMultBy(moonlight, componentExp((light_atten * -1.f) * lighty));
- //clampColor(moonlight, getGamma(), 1.0f);
mMoonDiffuse = componentMult(moonlight, light_transmittance) * moon_brightness;
- mMoonAmbient = componentMult(moonlight_b, light_transmittance) * 0.0125f;
+ mMoonAmbient = moonlight_b * 0.0125f;
- mTotalAmbient = mSunAmbient;
+ mTotalAmbient = ambient;
}
LLUUID LLSettingsSky::GetDefaultAssetId()