diff options
author | Rye <rye@lindenlab.com> | 2024-11-03 02:28:39 -0500 |
---|---|---|
committer | Rye <rye@lindenlab.com> | 2024-11-04 01:30:20 -0800 |
commit | 687930d5094e85c13d5ae7967b09eb08a879b333 (patch) | |
tree | a4ce0040ecde0c8aef71f1ba6f107c5703dc1d6d /indra/newview/llgltfmaterialpreviewmgr.cpp | |
parent | a57d82b3a9337eb4ac00340e80749ac97392e03e (diff) |
Integrate glow combine pass with other post process render passes to reduce another full screen copy
Diffstat (limited to 'indra/newview/llgltfmaterialpreviewmgr.cpp')
-rw-r--r-- | indra/newview/llgltfmaterialpreviewmgr.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp index f473afb74c..5ca841f9f1 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.cpp +++ b/indra/newview/llgltfmaterialpreviewmgr.cpp @@ -529,32 +529,14 @@ bool LLGLTFPreviewTexture::render() gPipeline.tonemap(&screen, dst); std::swap(src, dst); + // Final render LLVertexBuffer::unbind(); gPipeline.generateGlow(src); - gPipeline.combineGlow(src, dst); - std::swap(src, dst); + gPipeline.combineGlow(src, nullptr); // *HACK: Restore mExposureMap (it will be consumed by generateExposure next frame) gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure); - // Final render - - gDeferredPostNoDoFProgram.bind(); - - // From LLPipeline::renderFinalize: "Whatever is last in the above post processing chain should _always_ be rendered directly here. If not, expect problems." - gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src); - gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, mBoundTarget, true); - - gDeferredPostNoDoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight()); - - { - LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS); - gPipeline.mScreenTriangleVB->setBuffer(); - gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); - } - - gDeferredPostNoDoFProgram.unbind(); - // Clean up gPipeline.setupHWLights(); gPipeline.mReflectionMapManager.forceDefaultProbeAndUpdateUniforms(false); |