summaryrefslogtreecommitdiff
path: root/indra/newview/lllegacyatmospherics.cpp
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2021-10-27 15:59:53 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2021-10-27 15:59:53 +0000
commitaa7ca0aea134c9c40a0d4d1450cc64b7831d005f (patch)
tree9b8d588ba6058192add90579350d47114db09e7e /indra/newview/lllegacyatmospherics.cpp
parentc907d067f41930bd6a4bbef9903febfab1090982 (diff)
parent26e8d2d8c7328878cb6bc83eb6b3b7b5b1462f17 (diff)
Merged in SL-16127 (pull request #741)
SL-16127 Approved-by: Euclid Linden Approved-by: Dave Parks
Diffstat (limited to 'indra/newview/lllegacyatmospherics.cpp')
-rw-r--r--indra/newview/lllegacyatmospherics.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp
index a2acb3efe2..9eda254b25 100644
--- a/indra/newview/lllegacyatmospherics.cpp
+++ b/indra/newview/lllegacyatmospherics.cpp
@@ -211,8 +211,8 @@ LLColor4 LLAtmospherics::calcSkyColorInDir(AtmosphericsVars& vars, const LLVecto
// 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 sky_saturation = 0.25f;
- F32 land_saturation = 0.1f;
+ const F32 sky_saturation = 0.25f;
+ const F32 land_saturation = 0.1f;
if (isShiny && dir.mV[VZ] < -0.02f)
{
@@ -270,11 +270,12 @@ LLColor4 LLAtmospherics::calcSkyColorInDir(const LLSettingsSky::ptr_t &psky, Atm
// indra\newview\lllegacyatmospherics.cpp
void LLAtmospherics::calcSkyColorWLVert(const LLSettingsSky::ptr_t &psky, LLVector3 & Pn, AtmosphericsVars& vars)
{
- LLColor3 blue_density = vars.blue_density;
- LLColor3 blue_horizon = vars.blue_horizon;
- F32 haze_horizon = vars.haze_horizon;
- F32 haze_density = vars.haze_density;
- F32 density_multiplier = vars.density_multiplier;
+ const LLColor3 blue_density = vars.blue_density;
+ const LLColor3 blue_horizon = vars.blue_horizon;
+ const F32 haze_horizon = vars.haze_horizon;
+ const F32 haze_density = vars.haze_density;
+ const F32 density_multiplier = vars.density_multiplier;
+
F32 max_y = vars.max_y;
LLVector4 sun_norm = vars.sun_norm;
@@ -313,7 +314,7 @@ void LLAtmospherics::calcSkyColorWLVert(const LLSettingsSky::ptr_t &psky, LLVect
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
LLColor3 light_atten = vars.light_atten;
- LLColor3 light_transmittance = psky->getLightTransmittance(Plen);
+ LLColor3 light_transmittance = psky->getLightTransmittanceFast(vars.total_density, vars.density_multiplier, Plen);
(void)light_transmittance; // silence Clang warn-error
// Calculate relative weights