summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-01-10 19:49:18 -0600
committerDave Parks <davep@lindenlab.com>2023-01-10 19:49:18 -0600
commit493d501cde13abf1ac4164cd77286f068da3a62c (patch)
treed325c3e445edd197a5afb777c138f5265355d6ec /indra/newview/pipeline.cpp
parent28c245b071e0dfdbacce6f287eb80f57f850d857 (diff)
SL-18869 Optimizations -- Revive "Frame Profile" and GL_DEPTH_CLAMP. Remove usage of gl_FragDepth from shadow shaders.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6ac059df91..5f90fae25f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9470,7 +9470,9 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLGLEnable cull(GL_CULL_FACE);
//enable depth clamping if available
- //LLGLEnable depth_clamp(GL_DEPTH_CLAMP);
+ LLGLEnable depth_clamp(GL_DEPTH_CLAMP);
+
+ LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_LESS);
if (use_shader)
{
@@ -9513,15 +9515,8 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
for (int j = 0; j < 2; ++j) // 0 -- static, 1 -- rigged
{
bool rigged = j == 1;
- if (!use_shader)
- { //occlusion program is general purpose depth-only no-textures
- gOcclusionProgram.bind(rigged);
- }
- else
- {
- gDeferredShadowProgram.bind(rigged);
- LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
- }
+ gDeferredShadowProgram.bind(rigged);
+ LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
gGL.diffuseColor4f(1, 1, 1, 1);
@@ -9555,10 +9550,6 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- if (!use_shader)
- {
- gOcclusionProgram.unbind();
- }
}
if (occlude > 1)