mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
removed redundant cleartarget, added clearcolorattachment 4, tagged gbuffer slots
This commit is contained in:
parent
8fadf880a3
commit
86e5fe2adf
1 changed files with 6 additions and 5 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue