From 906b0be675e5467665f65180924e6117700b4cbb Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 3 May 2019 08:47:13 -0700 Subject: SL-11087, SL-11086, SL-11092 Fix sun/moon glow factor bustage. Make darkness an option. Fix moon fade shader logic getting confused when sun was below horizon. --- indra/llinventory/llsettingssky.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llinventory/llsettingssky.cpp') diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index aa26cd8054..a090a7be32 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1292,15 +1292,15 @@ void LLSettingsSky::calculateLightSettings() const mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance)); mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance)); - F32 moon_brightness = getMoonBrightness(); + F32 moon_brightness = getIsMoonUp() ? getMoonBrightness() : 0.001f; - LLColor3 moonlight_a(0.66, 0.66, 0.66); - LLColor3 moonlight_b(0.66, 0.66, 1.0); + LLColor3 moonlight_a(0.45, 0.45, 0.66); + LLColor3 moonlight_b(0.33, 0.33, 1.0); LLColor3 moonlight = lerp(moonlight_b, moonlight_a, moon_brightness); componentMultBy(moonlight, componentExp((light_atten * -1.f) * lighty)); - mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness * 0.25f); + mMoonDiffuse = gammaCorrect(componentMult(moonlight, light_transmittance) * moon_brightness); mMoonAmbient = gammaCorrect(componentMult(moonlight_b, light_transmittance) * 0.0125f); mTotalAmbient = mSunAmbient + mMoonAmbient; } -- cgit v1.2.3 From 1522a9902481b69b3d04bee5edd79102a796630b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 3 May 2019 10:12:56 -0700 Subject: SL-11070 Gave clouds the Bob Ross treatment. --- indra/llinventory/llsettingssky.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llinventory/llsettingssky.cpp') diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index a090a7be32..def492c203 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1189,7 +1189,7 @@ LLColor3 LLSettingsSky::getTotalDensity() const // this is used later for sunlight modulation at various altitudes LLColor3 LLSettingsSky::getLightAttenuation(F32 distance) const { - F32 density_multiplier = getDensityMultiplier(); + F32 density_multiplier = getDensityMultiplier() * 0.45f; LLColor3 blue_density = getBlueDensity(); F32 haze_density = getHazeDensity(); // Approximate line integral over requested distance @@ -1200,7 +1200,7 @@ LLColor3 LLSettingsSky::getLightAttenuation(F32 distance) const LLColor3 LLSettingsSky::getLightTransmittance() const { LLColor3 total_density = getTotalDensity(); - F32 density_multiplier = getDensityMultiplier(); + F32 density_multiplier = getDensityMultiplier() * 0.45f; // Transparency (-> density) from Beer's law LLColor3 transmittance = componentExp(total_density * -density_multiplier); return transmittance; -- cgit v1.2.3