I understand that the flip presentation mode (DXGI_SWAP_EFFECT_FLIP_DISCARD
) is recommended but it does not seem to support multi-sampling. So how can you do anti-aliasing ?
I understand that the flip presentation mode (DXGI_SWAP_EFFECT_FLIP_DISCARD
) is recommended but it does not seem to support multi-sampling. So how can you do anti-aliasing ?
The modern "flip" modes (DXGI_SWAP_EFFECT_FLIP_DISCARD
and DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
) enforce some new usage rules. Specifically you can't create an MSAA backbuffer or an _SRGB
format backbuffer.
The reality is that when using the legacy "blt" style modes (DXGI_SWAP_EFFECT_DISCARD
, DXGI_SWAP_EFFECT_SEQUENTIAL
), you can't really create an MSAA backbuffer at all. It just implicitly created a single-sample backbuffer and a MSAA render target, and did the resolve "by magic".
In most 'real world' rendering solutions, you (a) don't just do a resolve, and (b) don't immediately render the resolved content of the MSAA render target. Post-processing, custom anti-aliasing, and post-resolve UI composition all takes place before you Present the result. As such, the 'magic' solution is only useful for trivial samples.
See this blog series: The Care and Feeding of Modern Swap Chains