From f3b87145775d3803306036d1e31fa39177f2600e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 11 Dec 2023 15:28:25 -0600 Subject: SL-20611 Followup -- fix for artifacts on water surface from GPUs that don't like to read from a depth buffer that is bound for writing --- indra/newview/lldrawpoolwater.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'indra/newview/lldrawpoolwater.cpp') diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 14f3142e1b..ca93815de7 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -206,7 +206,7 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) } } - gPipeline.bindDeferredShader(*shader); + gPipeline.bindDeferredShader(*shader, nullptr, &gPipeline.mWaterDis); //bind normal map S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP); @@ -238,7 +238,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) // bind reflection texture from RenderTarget S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX); - S32 screenDepth = shader->enableTexture(LLShaderMgr::WATER_SCREENDEPTH); F32 screenRes[] = { 1.f / gGLViewport[2], 1.f / gGLViewport[3] }; @@ -255,11 +254,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) gGL.getTexUnit(screentex)->bind(&gPipeline.mWaterDis); } - if (screenDepth > -1) - { - gGL.getTexUnit(screenDepth)->bind(&gPipeline.mWaterDis, true); - } - if (mShaderLevel == 1) { fog_color.mV[VW] = log(fog_density) / log(2); @@ -342,7 +336,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) shader->disableTexture(LLShaderMgr::BUMP_MAP); shader->disableTexture(LLShaderMgr::DIFFUSE_MAP); shader->disableTexture(LLShaderMgr::WATER_REFTEX); - shader->disableTexture(LLShaderMgr::WATER_SCREENDEPTH); // clean up gPipeline.unbindDeferredShader(*shader); -- cgit v1.2.3