summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolpbropaque.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolpbropaque.cpp')
-rw-r--r--indra/newview/lldrawpoolpbropaque.cpp43
1 files changed, 39 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp
index 9dd1bc0ba2..d30fc22393 100644
--- a/indra/newview/lldrawpoolpbropaque.cpp
+++ b/indra/newview/lldrawpoolpbropaque.cpp
@@ -31,22 +31,57 @@
#include "llviewershadermgr.h"
#include "pipeline.h"
+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)
{
}
+S32 LLDrawPoolGLTFPBR::getNumDeferredPasses()
+{
+ return 1;
+}
+
void LLDrawPoolGLTFPBR::renderDeferred(S32 pass)
{
- const U32 types[] = { LLPipeline::RENDER_TYPE_PASS_GLTF_PBR, LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK };
+ llassert(!LLPipeline::sRenderingHUDs);
- for (U32 type : types)
+ for (U32 type : gltf_render_types)
{
gDeferredPBROpaqueProgram.bind();
pushGLTFBatches(type);
-
+
gDeferredPBROpaqueProgram.bind(true);
- pushRiggedGLTFBatches(type+1);
+ pushRiggedGLTFBatches(type + 1);
+ }
+}
+
+S32 LLDrawPoolGLTFPBR::getNumPostDeferredPasses()
+{
+ return 1;
+}
+
+void LLDrawPoolGLTFPBR::renderPostDeferred(S32 pass)
+{
+ if (LLPipeline::sRenderingHUDs)
+ {
+ gHUDPBROpaqueProgram.bind();
+ for (U32 type : gltf_render_types)
+ {
+ pushGLTFBatches(type);
+ }
+ }
+ else
+ {
+ gGL.setColorMask(false, true);
+ gPBRGlowProgram.bind();
+ pushGLTFBatches(LLRenderPass::PASS_GLTF_GLOW);
+
+ gPBRGlowProgram.bind(true);
+ pushRiggedGLTFBatches(LLRenderPass::PASS_GLTF_GLOW_RIGGED);
+
+ gGL.setColorMask(true, false);
}
}