diff options
author | Rider Linden <rider@lindenlab.com> | 2019-02-13 17:04:59 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2019-02-13 17:04:59 -0800 |
commit | e9777048751c73819e85257a6e7b0d0608fd6c39 (patch) | |
tree | c625f4e5c04f0882df16308b38ada6fd4d1e02e4 /indra/newview/lldrawpoolwater.cpp | |
parent | 98d6d1969be08f16a5d565b544f46c8a13fb4db5 (diff) | |
parent | 07d509bce6dc06a7ef8b3a640d622d1ed44ae3cc (diff) |
Merge
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 23749d7adb..b2f0d956c4 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -537,7 +537,10 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getWaterFogColor().mV); - shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getWaterFogDensity()); + + F32 fog_density = pwater->getModifiedWaterFogDensity(LLPipeline::sUnderWaterRender || (eyedepth <= 0.0f)); + + shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, fog_density); // bind reflection texture from RenderTarget S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX); @@ -546,7 +549,7 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li if (mShaderLevel == 1) { LLColor4 fog_color(pwater->getWaterFogColor(), 0.f); - fog_color[3] = pwater->getWaterFogDensity(); + fog_color[3] = fog_density; shader->uniform4fv(LLShaderMgr::WATER_FOGCOLOR, 1, fog_color.mV); } @@ -616,6 +619,8 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li { LLGLDisable cullface(GL_CULL_FACE); + + sNeedsReflectionUpdate = TRUE; sNeedsDistortionUpdate = TRUE; |