diff options
-rw-r--r-- | indra/newview/pipeline.cpp | 51 | ||||
-rw-r--r-- | indra/newview/pipeline.h | 1 |
2 files changed, 29 insertions, 23 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a6364ff092..572d388b15 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7193,25 +7193,6 @@ void LLPipeline::renderGlow(LLRenderTarget* src, LLRenderTarget* dst) { mGlow[1].clear(); mGlow[1].flush(); } - - // Go ahead and do our glow combine here in our destination. We blit this later into the front buffer. - - dst->bindTarget(); - - { - LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS); - - gGlowCombineProgram.bind(); - - gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src); - gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true); - gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_EMISSIVE, &mGlow[1]); - - mScreenTriangleVB->setBuffer(); - mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); - } - - dst->flush(); } void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) { @@ -7288,6 +7269,8 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) { } void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) { + + LL_PROFILE_GPU_ZONE("copyRenderTarget"); dst->bindTarget(); gDeferredPostNoDoFProgram.bind(); @@ -7309,6 +7292,27 @@ void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) { dst->flush(); } +void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) { + // Go ahead and do our glow combine here in our destination. We blit this later into the front buffer. + + dst->bindTarget(); + + { + LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS); + + gGlowCombineProgram.bind(); + + gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src); + gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true); + gGlowCombineProgram.bindTexture(LLShaderMgr::DEFERRED_EMISSIVE, &mGlow[1]); + + mScreenTriangleVB->setBuffer(); + mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); + } + + dst->flush(); +} + void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { { bool dof_enabled = @@ -7539,7 +7543,6 @@ void LLPipeline::renderFinalize() if (!gCubeSnapshot) { - copyScreenSpaceReflections(&mRT->screen, &mSceneMap); generateLuminance(&mRT->screen, &mLuminanceMap); @@ -7551,11 +7554,13 @@ void LLPipeline::renderFinalize() LLVertexBuffer::unbind(); } - renderGlow(&mPostMap, &mRT->screen); + renderGlow(&mPostMap, &mRT->screen); // We don't actually write to the screen buffer here. Should probably pass in mGlow[2] as our destination. + + renderDoF(&mPostMap, &mRT->screen); - renderDoF(&mRT->screen, &mPostMap); + applyFXAA(&mRT->screen, &mPostMap); - applyFXAA(&mPostMap, &mRT->screen); + combineGlow(&mPostMap, &mRT->screen); // Present the screen target. diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 3be908bdf7..072ae2bf14 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -143,6 +143,7 @@ public: void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst); void renderDoF(LLRenderTarget* src, LLRenderTarget* dst); void copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst); + void combineGlow(LLRenderTarget* src, LLRenderTarget* dst); void renderPostProcess(); LLRenderTarget* screenTarget(); |