summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-08-13 08:39:55 -0700
committerGraham Linden <graham@lindenlab.com>2019-08-13 08:39:55 -0700
commitfac181b179c60f0ca0fcc6ed3a97e022bbaa51ef (patch)
treeeb34676a4db9fccade0c437b6f8233fd1efc7421 /indra/newview
parent4e4011cddc4c6edf797bd3ff7950fb02d178a2e2 (diff)
SL-11212
Calculate sunAngle2 correctly given light dir in new coord space.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolwater.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 13420fc001..073adfb627 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -600,7 +600,7 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li
shader->uniform1f(LLShaderMgr::WATER_FRESNEL_OFFSET, pwater->getFresnelOffset());
shader->uniform1f(LLShaderMgr::WATER_BLUR_MULTIPLIER, pwater->getBlurMultiplier());
- F32 sunAngle = llmax(0.f, light_dir.mV[2]);
+ F32 sunAngle = llmax(0.f, light_dir.mV[1]);
F32 scaledAngle = 1.f - sunAngle;
shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);