diff options
author | Graham Linden <graham@lindenlab.com> | 2019-03-28 14:18:59 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-03-28 14:18:59 -0700 |
commit | 823172cab99c55b1c26b523d7dd63a99ece9f6cb (patch) | |
tree | 89fbe60cba0ce07c2033c192b30ff44fe4734797 /indra/llinventory | |
parent | 03426a7ddbf1b3bb8349241d3b52962026f7504a (diff) |
SL-10831
Make moon brightness env setting affect moon diffuse/ambient color combo so it affects in-world lighting.
Adjust how the moon brightness affects the moon disc texture rendering (washes out less).
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index a7b87c4d96..0010e62658 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1295,9 +1295,15 @@ void LLSettingsSky::calculateLightSettings() const mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance)); mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance) * 0.5); - LLColor3 moonlight(0.75, 0.75, 0.92); - mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * 0.25f); - mMoonAmbient = gammaCorrect(componentMult(moonlight, light_transmittance) * 0.125f); + F32 moon_brightness = getMoonBrightness(); + + LLColor3 moonlight_a(0.66, 0.66, 0.66); + LLColor3 moonlight_b(0.66, 0.66, 1.0); + + LLColor3 moonlight = lerp(moonlight_b, moonlight_a, moon_brightness);
+ + mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness * 0.25f); + mMoonAmbient = gammaCorrect(componentMult(moonlight_b, light_transmittance) * 0.0125f); mTotalAmbient = mSunAmbient; } |