Cinder icon indicating copy to clipboard operation
Cinder copied to clipboard

Cinder Vulkan back-end (NormalMapping test app): Color attachment is not cleared which leads to visual artifacts

Open DominikWitczakAMD opened this issue 10 years ago • 2 comments

The app uses one of the two renderpasses, configured as per picture below, to render the mesh:

image

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.

DominikWitczakAMD avatar Mar 11 '16 12:03 DominikWitczakAMD

Added vkCmdClearAttachments when there's single sample. Multi-sample is cleared on load. https://github.com/cinder/Cinder/commit/56a9e19fa233a8a9efc72c8561fe68a1753b4cfd

chaoticbob avatar Mar 13 '16 07:03 chaoticbob

Works for me :)

DominikWitczakAMD avatar Mar 15 '16 10:03 DominikWitczakAMD