summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-21 22:13:08 -0600
committerDave Parks <davep@lindenlab.com>2023-02-21 22:13:08 -0600
commit0336c1a06de89937d5c0f971e06270afc868ddfa (patch)
tree5c2675c162511589e95d28cf94ebf3124c3303e9 /indra/newview/pipeline.cpp
parent8f83724f7eb6f05150951fabac2a89f4b83abe39 (diff)
DRTVWR-559 Fix SSR on transparent PBR surfaces.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d0688d26a9..a4578c0e98 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7821,18 +7821,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
stop_glerror();
}
- channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bind(&mSceneMap);
- }
-
- channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bind(&mSceneMap, true);
- }
-
if (shader.getUniformLocation(LLShaderMgr::VIEWPORT) != -1)
{
shader.uniform4f(LLShaderMgr::VIEWPORT, (F32) gGLViewport[0],
@@ -8765,6 +8753,21 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
setEnvMat(shader);
}
+
+ // reflection probe shaders generally sample the scene map as well for SSR
+ channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(channel)->bind(&mSceneMap);
+ }
+
+ channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(channel)->bind(&mSceneMap, true);
+ }
+
+
}
void LLPipeline::unbindReflectionProbes(LLGLSLShader& shader)