diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-13 13:09:14 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-13 13:09:14 -0800 |
commit | 65927e0a76aaf8ff4dc268acdb12007265ff3a14 (patch) | |
tree | a42b75a5b880849c9ec5a7f610669f4c9dd674ad /indra/newview/lldrawpoolwater.cpp | |
parent | 5433ed60ac93c6ccc7692ad43d579a83ab544f31 (diff) |
SL-10181, SL-10546
Fix distortion map rendering in deferred mode not including underwater fog effects.
Fix distortion map rendering not including post-deferred content at all.
Fix distortion map rendering not including anything but sky when camera is underwater.
Update sun_up_factor/sunmoon_glow_factor uniforms even when sun disc isn't in use.
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; |