summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingsvo.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-29 00:19:52 -0500
committerDave Parks <davep@lindenlab.com>2022-09-29 00:19:52 -0500
commit411aa9f727efba971c8577cef4d6a31f096a6fea (patch)
tree7cc32ed6726014613c8a38bee9a5d79476249a3c /indra/newview/llsettingsvo.cpp
parent2e499bcc40871b6a68700203cc83fe7d81c79c24 (diff)
SL-18190 Fix for haze color being completely wrong (now it's just half wrong).
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r--indra/newview/llsettingsvo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index a5a8ec4a93..6cd4c973d9 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -710,7 +710,9 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
LLColor4 ambient(getTotalAmbient());
shader->uniform4fv(LLShaderMgr::AMBIENT, LLVector4(ambient.mV));
- shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, LLVector3(linearColor3(LLColor3(ambient.mV)).mV));
+ shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, linearColor3v(getAmbientColor()/3.f)); // note magic number 3.f comes from SLIDER_SCALE_SUN_AMBIENT
+ shader->uniform3fv(LLShaderMgr::SUNLIGHT_LINEAR, linearColor3v(getSunlightColor()));
+ shader->uniform3fv(LLShaderMgr::MOONLIGHT_LINEAR,linearColor3v(getMoonlightColor()));
shader->uniform1f(LLShaderMgr::REFLECTION_PROBE_AMBIANCE, getReflectionProbeAmbiance());
shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, getIsSunUp() ? 1 : 0);
@@ -724,8 +726,8 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
shader->uniform1f(LLShaderMgr::GAMMA, g);
shader->uniform1f(LLShaderMgr::DISPLAY_GAMMA, display_gamma);
- shader->uniform3fv(LLShaderMgr::BLUE_HORIZON_LINEAR, linearColor3v(getBlueHorizon()));
- shader->uniform3fv(LLShaderMgr::BLUE_DENSITY_LINEAR, linearColor3v(getBlueDensity()));
+ shader->uniform3fv(LLShaderMgr::BLUE_HORIZON_LINEAR, linearColor3v(getBlueHorizon()/2.f)); // note magic number of 2.f comes from SLIDER_SCALE_BLUE_HORIZON_DENSITY
+ shader->uniform3fv(LLShaderMgr::BLUE_DENSITY_LINEAR, linearColor3v(getBlueDensity()/2.f));
shader->uniform1f(LLShaderMgr::HAZE_DENSITY_LINEAR, sRGBtoLinear(getHazeDensity()));
}