This sample demonstrates the implementation of Multi-Sample Anti-Aliasing (MSAA) in Vulkan.
- Created in
createMsaaBuffers()
- Dynamically recreated on image size or
VkSampleCountFlagBits
changes
- Color:
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
- Depth:
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- Required for display (MSAA textures cannot be directly attached/displayed)
- Target for MSAA image resolution
- Utilizes dynamic rendering
- Attaches G-Buffer as target
- For MSAA:
- Attaches multi-sampled image
- Attaches G-Buffer as resolve image
- MSAA images require resolution to non-MSAA G-Buffer for display
- Dynamic recreation of MSAA buffers ensures adaptability to runtime changes