* Clear full framebuffer

* Fix type coercion

* Use bgfx API properly

* Remove redundant calls
This commit is contained in:
Richard Schubert 2021-10-15 16:36:46 +02:00 committed by GitHub
parent a1d2c03eba
commit ffeba57b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,6 +531,17 @@ namespace
bgfx::ViewId view = 0;
// Clear full frame buffer to avoid sampling into garbage during FSR pass
if (!m_state.m_renderNativeResolution)
{
bgfx::setViewRect(view, 0, 0, (uint16_t)m_state.m_width, (uint16_t)m_state.m_height);
bgfx::setViewClear(view, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, 0x00000000, 1.0f, 0);
bgfx::setViewFrameBuffer(view, m_state.m_frameBuffer);
bgfx::touch(view);
++view;
}
// Draw models into scene
{
bgfx::setViewName(view, "forward scene");