diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2020-02-25 13:23:51 -0800 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2020-02-25 13:25:15 -0800 |
commit | c4c8d2017494dc1e673b2cb09f031a1715efa0af (patch) | |
tree | d369e78d0ab5b407f1186373a642207f0e4917f9 | |
parent | d87cc68a72393cdc56dcbc2e36fd94ec7a814246 (diff) |
SL-12574 Tweak sky to better match Windlight
-rw-r--r-- | indra/newview/lllegacyatmospherics.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 165ef8c797..e061b3ad17 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -208,23 +208,25 @@ LLColor4 LLAtmospherics::calcSkyColorInDir(AtmosphericsVars& vars, const LLVecto return calcSkyColorInDir(psky, vars, dir, isShiny); } +// This cubemap is used as "environmentMap" in indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl LLColor4 LLAtmospherics::calcSkyColorInDir(const LLSettingsSky::ptr_t &psky, AtmosphericsVars& vars, const LLVector3 &dir, bool isShiny) { - F32 saturation = 0.3f; + F32 sky_saturation = 0.25f; + F32 land_saturation = 0.1f; if (isShiny && dir.mV[VZ] < -0.02f) { LLColor4 col; LLColor3 desat_fog = LLColor3(mFogColor); - F32 brightness = desat_fog.brightness(); + F32 brightness = desat_fog.brightness();// NOTE: Linear brightness! // So that shiny somewhat shows up at night. if (brightness < 0.15f) { brightness = 0.15f; desat_fog = smear(0.15f); } - F32 greyscale_sat = brightness * (1.0f - saturation); - desat_fog = desat_fog * saturation + smear(greyscale_sat); + F32 greyscale_sat = brightness * (1.0f - land_saturation); + desat_fog = desat_fog * land_saturation + smear(greyscale_sat); if (!gPipeline.canUseWindLightShaders()) { col = LLColor4(desat_fog, 0.f); @@ -250,9 +252,9 @@ LLColor4 LLAtmospherics::calcSkyColorInDir(const LLSettingsSky::ptr_t &psky, Atm if (isShiny) { F32 brightness = vars.hazeColor.brightness(); - F32 greyscale_sat = brightness * (1.0f - saturation); - LLColor3 sky_color = vars.hazeColor * saturation + smear(greyscale_sat); - sky_color *= (0.5f + 0.5f * brightness); + F32 greyscale_sat = brightness * (1.0f - sky_saturation); + LLColor3 sky_color = vars.hazeColor * sky_saturation + smear(greyscale_sat); + //sky_color *= (0.5f + 0.5f * brightness); // SL-12574 EEP sky was too dark dark grey/blue, lighten it slightly return LLColor4(sky_color, 0.0f); } |