Code Sample: Conservative Morphological Anti-Aliasing Version 2 (CMAA2)

License:CMAA2 is licensed under Apache* License 2.0.
Optimized for... 
OS:64-bit Windows® 10
Hardware:GPU required
(Programming Language, tool, IDE, Framework)
Microsoft Visual Studio* 2017, DirectX* 11, Microsoft Compute Shader 5.0 Windows Platform SDK
Prerequisites:Familiarity with Microsoft Visual Studio, DirectX 11, Compute Shaders in HLSL


The GitHub* repository contains an implementation of CMAA2, a post-process anti-aliasing solution focused on providing good anti-aliasing while minimizing the change (i.e. blurring) of the source image at minimal execution cost.

Details of the implementation as well as quality and performance analysis are provided in the accompanying article.

Sample code in this repository is a DirectX 11 Compute Shader 5.0 HLSL reference implementation optimized for modern PC GPU hardware. DirectX* 12 and Vulkan* ports are also in development.

Get Started

This sample is tested to build and run on a 64-bit Windows Platform with a DirectX 11 compatible GPU with support for Compute Shader Model 5.0 or above where the Microsoft Visual Studio 2017 and the most recent Windows Platform SDK has been installed. Open the CMAA2.sln file from the main directory and select Compile, then ‘Start’ from the Visual Studio menus after compilation has completed successfully. Alternatively, select the CMAA2D.exe for the Debug build or CMAA2.exe for the Release build. Both are found in the directory CMAA2-master/Projects/CMAA2/.

See the Code integration guide as part of the GitHub for details.


See the white paper for a complete list of references

Updated Log

Created September 4, 2018.

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.