diff options
author | Graham Linden <graham@lindenlab.com> | 2019-06-06 15:55:50 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-06-06 15:55:50 -0700 |
commit | 158a0104c1d00e56b46fec31e650cd6942cac735 (patch) | |
tree | 8a08682e25b6c4a7bbbf852311199c46ade1891d /indra/newview/lldrawpoolwater.cpp | |
parent | a7856d4fc5b765b2e381f7606633db9431a3a80c (diff) |
SL-11367
Use rotated lightnorm directly in water shader instead of forcing all shaders marked as water (including lighting) to get that norm
(where it would only affect Mid as only that graphics mode has atmospherics on but isn't using deferred rendering).
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 2c9418ca19..1b5c154378 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -606,6 +606,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(); + shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, rotated_light_direction.mV); + shader->uniform3fv(LLShaderMgr::WL_CAMPOSLOCAL, 1, LLViewerCamera::getInstance()->getOrigin().mV); + if (LLViewerCamera::getInstance()->cameraUnderWater()) { shader->uniform1f(LLShaderMgr::WATER_REFSCALE, pwater->getScaleBelow()); |