Fixed MRT buffers not being cleared if homogeneousDepth is disabled

This commit is contained in:
SnapperTT 2019-05-21 15:58:51 +10:00 committed by GitHub
parent 0f2dfae5e1
commit 14f13ae656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3806,7 +3806,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
m_clearQuadDepth = infoClearDepth->m_handle;
}
float mrtClearDepth[4] = { _clear.m_depth * 2.0f - 1.0f };
float mrtClearDepth[4] = { g_caps.homogeneousDepth ? (_clear.m_depth * 2.0f - 1.0f) : _clear.m_depth };
updateUniform(m_clearQuadDepth.idx, mrtClearDepth, sizeof(float)*4);
float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];