summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2022-03-07 17:40:43 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2022-03-07 17:40:43 +0000
commit2d63d2044e0a00d1969c3da254e016a6e520c0d5 (patch)
tree51d4ab385e05657c6305c0af3ef12d32cb5aee23 /indra
parentbdc611badb4450acbcda019b1d11ff92e690f8af (diff)
parentd7bb4cdc8d90271a929bdae25628ef88437c5bee (diff)
Merged in SL-15861 (pull request #896)
SL-15861: Fix inconsistent additive light spanning 180 degrees for water angles in Mid quality.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpoolwater.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index aa426cd785..53e8ff6759 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -602,7 +602,10 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li
shader->uniform1f(LLShaderMgr::WATER_SUN_ANGLE2, 0.1f + 0.2f*sunAngle);
shader->uniform1i(LLShaderMgr::WATER_EDGE_FACTOR, edge ? 1 : 0);
- LLVector4 rotated_light_direction = LLEnvironment::instance().getRotatedLightNorm();
+ // SL-15861 This was changed from getRotatedLightNorm() as it was causing
+ // lightnorm in shaders\class1\windlight\atmosphericsFuncs.glsl in have inconsistent additive lighting for 180 degrees of the FOV.
+ LLVector4 rotated_light_direction = LLEnvironment::instance().getClampedLightNorm();
+
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, rotated_light_direction.mV);
shader->uniform3fv(LLShaderMgr::WL_CAMPOSLOCAL, 1, LLViewerCamera::getInstance()->getOrigin().mV);