summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolpbropaque.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-21 20:42:25 -0600
committerDave Parks <davep@lindenlab.com>2023-02-21 20:42:25 -0600
commit19f7497d9a01731cbd82be4b522d8b879cdcb8a0 (patch)
tree4b2e59c87cb5d96b2e9c4e7be0c0131876df8897 /indra/newview/lldrawpoolpbropaque.cpp
parent131d116ffd21ef1e726e21c8fe2e6b7068c6c3d9 (diff)
DRTVWR-559 WIP -- occlusion culling for reflection probes -- has a defect for objects close to the camera at some angles and leaks query objects, will follow up.
Diffstat (limited to 'indra/newview/lldrawpoolpbropaque.cpp')
-rw-r--r--indra/newview/lldrawpoolpbropaque.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp
index d30fc22393..b75c83e73a 100644
--- a/indra/newview/lldrawpoolpbropaque.cpp
+++ b/indra/newview/lldrawpoolpbropaque.cpp
@@ -33,9 +33,17 @@
static const U32 gltf_render_types[] = { LLPipeline::RENDER_TYPE_PASS_GLTF_PBR, LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK };
-LLDrawPoolGLTFPBR::LLDrawPoolGLTFPBR() :
- LLRenderPass(POOL_GLTF_PBR)
+LLDrawPoolGLTFPBR::LLDrawPoolGLTFPBR(U32 type) :
+ LLRenderPass(type)
{
+ if (type == LLDrawPool::POOL_GLTF_PBR_ALPHA_MASK)
+ {
+ mRenderType = LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK;
+ }
+ else
+ {
+ mRenderType = LLPipeline::RENDER_TYPE_PASS_GLTF_PBR;
+ }
}
S32 LLDrawPoolGLTFPBR::getNumDeferredPasses()
@@ -47,14 +55,11 @@ void LLDrawPoolGLTFPBR::renderDeferred(S32 pass)
{
llassert(!LLPipeline::sRenderingHUDs);
- for (U32 type : gltf_render_types)
- {
- gDeferredPBROpaqueProgram.bind();
- pushGLTFBatches(type);
+ gDeferredPBROpaqueProgram.bind();
+ pushGLTFBatches(mRenderType);
- gDeferredPBROpaqueProgram.bind(true);
- pushRiggedGLTFBatches(type + 1);
- }
+ gDeferredPBROpaqueProgram.bind(true);
+ pushRiggedGLTFBatches(mRenderType + 1);
}
S32 LLDrawPoolGLTFPBR::getNumPostDeferredPasses()
@@ -67,12 +72,9 @@ void LLDrawPoolGLTFPBR::renderPostDeferred(S32 pass)
if (LLPipeline::sRenderingHUDs)
{
gHUDPBROpaqueProgram.bind();
- for (U32 type : gltf_render_types)
- {
- pushGLTFBatches(type);
- }
+ pushGLTFBatches(mRenderType);
}
- else
+ else if (mRenderType == LLPipeline::RENDER_TYPE_PASS_GLTF_PBR) // HACK -- don't render glow except for the non-alpha masked implementation
{
gGL.setColorMask(false, true);
gPBRGlowProgram.bind();
@@ -85,4 +87,3 @@ void LLDrawPoolGLTFPBR::renderPostDeferred(S32 pass)
}
}
-