Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 ?

question from:https://stackoverflow.com/questions/65932887/how-to-anti-alias-in-directx11-with-flip-mode

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
881 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...