From 86e5fe2adf1922a77edd87a52791724b9aabfb39 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Thu, 25 Oct 2018 20:03:28 -0500 Subject: [PATCH] removed redundant cleartarget, added clearcolorattachment 4, tagged gbuffer slots --- Engine/source/renderInstance/renderDeferredMgr.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Engine/source/renderInstance/renderDeferredMgr.cpp b/Engine/source/renderInstance/renderDeferredMgr.cpp index 1c68d3590..e4bceab56 100644 --- a/Engine/source/renderInstance/renderDeferredMgr.cpp +++ b/Engine/source/renderInstance/renderDeferredMgr.cpp @@ -337,11 +337,12 @@ void RenderDeferredMgr::render( SceneRenderState *state ) const bool isRenderingToTarget = _onPreRender(state); // Clear z-buffer and g-buffer. - GFX->clear(GFXClearTarget | GFXClearZBuffer | GFXClearStencil, ColorI::ZERO, 1.0f, 0); - GFX->clearColorAttachment(0, LinearColorF::ONE); - GFX->clearColorAttachment(1, LinearColorF::ZERO); - GFX->clearColorAttachment(2, LinearColorF::ZERO); - GFX->clearColorAttachment(3, LinearColorF::ZERO); + GFX->clear(GFXClearZBuffer | GFXClearStencil, ColorI::ZERO, 1.0f, 0); + GFX->clearColorAttachment(0, LinearColorF::ONE);//normdepth + GFX->clearColorAttachment(1, LinearColorF::ZERO);//albedo + GFX->clearColorAttachment(2, LinearColorF::ZERO);//matinfo + GFX->clearColorAttachment(3, LinearColorF::ZERO);//diffuse + GFX->clearColorAttachment(4, LinearColorF::ZERO);//specular // Restore transforms MatrixSet &matrixSet = getRenderPass()->getMatrixSet();