summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@lindenlab.com>2024-08-23 11:50:20 -0700
committerGitHub <noreply@github.com>2024-08-23 13:50:20 -0500
commit45b2d69446a68f5b104bd61055214d17da920fae (patch)
tree666741d9a7b51ab79dab3027b928669d46ab7846 /indra/newview/pipeline.cpp
parentefe8783d6bb054754033161c18948bf1cb7e206d (diff)
Add dedicated sun probe shader and remove SSAO and shadow smoothing from probe generation passes (#2405)
* Add dedicated sun probe shader and remove SSAO and shadow smoothing from probe generation passes (#2398) * Fix usage of removed sunLightNoFragCoordV in shader manager
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5bc880ea44..57cabcd18f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7930,13 +7930,15 @@ void LLPipeline::renderDeferredLighting()
mat.mult_matrix_vec(tc_moon);
mTransformedMoonDir.set(tc_moon.v);
- if (RenderDeferredSSAO || RenderShadowDetail > 0)
+ if ((RenderDeferredSSAO && !gCubeSnapshot) || RenderShadowDetail > 0)
{
LL_PROFILE_GPU_ZONE("sun program");
deferred_light_target->bindTarget();
{ // paint shadow/SSAO light map (direct lighting lightmap)
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - sun shadow");
- bindDeferredShader(gDeferredSunProgram, deferred_light_target);
+
+ LLGLSLShader& sun_shader = gCubeSnapshot ? gDeferredSunProbeProgram : gDeferredSunProgram;
+ bindDeferredShader(sun_shader, deferred_light_target);
mScreenTriangleVB->setBuffer();
glClearColor(1, 1, 1, 1);
deferred_light_target->clear(GL_COLOR_BUFFER_BIT);
@@ -7961,8 +7963,8 @@ void LLPipeline::renderDeferredLighting()
}
}
- gDeferredSunProgram.uniform3fv(sOffset, slice, offset);
- gDeferredSunProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
+ sun_shader.uniform3fv(sOffset, slice, offset);
+ sun_shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
(GLfloat)deferred_light_target->getWidth(),
(GLfloat)deferred_light_target->getHeight());
@@ -7972,12 +7974,12 @@ void LLPipeline::renderDeferredLighting()
mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
- unbindDeferredShader(gDeferredSunProgram);
+ unbindDeferredShader(sun_shader);
}
deferred_light_target->flush();
}
- if (RenderDeferredSSAO)
+ if (RenderDeferredSSAO && !gCubeSnapshot)
{
// soften direct lighting lightmap
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - soften shadow");