diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-10 14:19:09 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-10 14:19:09 -0600 |
commit | 579fc82f8a5c3e2a3a7834541f0cb0c3de8d4d91 (patch) | |
tree | 1cb43f3947f0ca29571b0e81a91744f4d30a353b /indra/newview/pipeline.cpp | |
parent | 94d3493e7b88d22c13570a48179a49f814e647db (diff) |
SL-19187 Fix for occlusion and shadow frusta debug displays not working as expected.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 65d9d4e060..f911aea9cd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2438,14 +2438,8 @@ void LLPipeline::doOcclusion(LLCamera& camera) { LLVertexBuffer::unbind(); - if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION)) - { - gGL.setColorMask(true, false, false, false); - } - else - { - gGL.setColorMask(false, false); - } + gGL.setColorMask(false, false); + LLGLDisable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -9417,7 +9411,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (fp.empty()) { - if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA)) + if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowCamera[0] = main_camera; mShadowExtents[0][0] = min; @@ -9497,23 +9491,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } else { - /*if (gCubeSnapshot) - { - // do one shadow split for cube snapshots, clear the rest - mSunClipPlanes.set(64.f, 64.f, 64.f); - dist[1] = dist[2] = dist[3] = dist[4] = 64.f; - for (S32 j = 1; j < 4; j++) - { - mRT->shadow[j].bindTarget(); - mRT->shadow[j].clear(); - mRT->shadow[j].flush(); - } - }*/ - - //for (S32 j = 0; j < (gCubeSnapshot ? 1 : 4); j++) for (S32 j = 0; j < 4; j++) { - if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA)) + if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowFrustPoints[j].clear(); } @@ -9555,7 +9535,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) shadow_cam.calcAgentFrustumPlanes(frust); shadow_cam.mFrustumCornerDist = 0.f; - if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowCamera[j] = shadow_cam; } @@ -9565,7 +9545,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir)) { //no possible shadow receivers - if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowExtents[j][0] = LLVector3(); mShadowExtents[j][1] = LLVector3(); @@ -9585,7 +9565,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) continue; } - if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowExtents[j][0] = min; mShadowExtents[j][1] = max; @@ -9812,7 +9792,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) eye = LLVector3(origin_agent.v); - if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowFrustOrigin[j] = eye; } @@ -9875,7 +9855,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) mRT->shadow[j].flush(); - if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowCamera[j+4] = shadow_cam; } |