I am learn Directx 11. Multisampling should be checked when initializing Directx 11 using code like:
UINT m4xMsaaQuality;
HRESULT hr = md3dDevice ->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, 4, &m4xMsaaQuality);
And when creating swap chain, m4xMsaaQuality is needed. The codes are like:
DXGI_SWAP_CHAIN_DESC sd;
sd.BufferDesc.Quality = m4xMsaaQuality -1;
These codes are from text book, I don't know why the quality should be less than m4xMsaaQuality by 1.
CheckMultisampleQualityLevels returns the number of quality levels, not the highest level.
If it returns "n" these levels are numbered 0 to n-1. For example if it returns 4 they are numbered 0, 1, 2, 3 - and if you want the highest one it's always one less than the number of levels
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With