From d452fd77eff53c031c74301dd44a35edce6da95b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 30 Aug 2018 21:37:10 +0100 Subject: MAINT-9007 fix management of water plane and fog Ks shader uniforms --- indra/newview/lldrawpoolwater.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'indra/newview/lldrawpoolwater.cpp') diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 913a85affd..7f1601e604 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -619,17 +619,11 @@ void LLDrawPoolWater::shade() } } - S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX); - - if (screentex > -1) - { - shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getWaterFogColor().mV); - shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getWaterFogDensity()); - gPipeline.mWaterDis.bindTexture(0, screentex); - } - - stop_glerror(); + shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getWaterFogColor().mV); + shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getWaterFogDensity()); + // bind reflection texture from RenderTarget + S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX); gGL.getTexUnit(screentex)->bind(&gPipeline.mWaterDis); if (mVertexShaderLevel == 1) -- cgit v1.2.3