Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.43 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.43 KB

Multi-Sample Anti-Aliasing (MSAA) in Vulkan

MSAA Demonstration

Overview

This sample demonstrates the implementation of Multi-Sample Anti-Aliasing (MSAA) in Vulkan.

Key Components

MSAA G-Buffers

  • Created in createMsaaBuffers()
  • Dynamically recreated on image size or VkSampleCountFlagBits changes

Image Usage Flags

  • 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

Non-MSAA G-Buffer

  • Required for display (MSAA textures cannot be directly attached/displayed)
  • Target for MSAA image resolution

Rendering Pipeline

onRender(cmd) Process

  1. Utilizes dynamic rendering
  2. Attaches G-Buffer as target
  3. For MSAA:
    • Attaches multi-sampled image
    • Attaches G-Buffer as resolve image

Technical Considerations

  • MSAA images require resolution to non-MSAA G-Buffer for display
  • Dynamic recreation of MSAA buffers ensures adaptability to runtime changes

References