Cinder
Cinder copied to clipboard
Cinder Vulkan back-end (NormalMapping test app): Color attachment is not cleared which leads to visual artifacts
The app uses one of the two renderpasses, configured as per picture below, to render the mesh:

This causes disturbing artifacts to show up, since previous frame contents is re-used in subsequent frames.
Recommendation is for the app to fast-clear the attachment by setting loadOp to VK_ATTACHMENT_LOAD_OP_CLEAR, or by recording a vkCmdClearColorImage() OR a vkCmdClearAttachments() call to the command buffer before the mesh is rendered.
Added vkCmdClearAttachments when there's single sample. Multi-sample is cleared on load. https://github.com/cinder/Cinder/commit/56a9e19fa233a8a9efc72c8561fe68a1753b4cfd
Works for me :)