Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
920 views
in Technique[技术] by (71.8m points)

directx - How to anti-alias in DirectX11 with Flip mode?

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

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

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...