I'm learning directx 11 and trying to set up multisampling. For some reason every tutorial on the internet disables multisampling and never goes over how to enable it.
First: I've searched around and can't find any examples of how to use CheckMultisampleQualityLevels
. It seems like you need to create a device, call that function, find out the available levels, then destroy that device and create a new one with the settings you want. Is this the correct way to do this? Or is there a better way?
Secondly, how do you enable multisampling? Since I'm not sure how to get CheckMultisampleQualityLevels
working, I tried putting in some values for DXGI_SWAP_CHAIN_DESC.SampleDesc.Count
and DXGI_SWAP_CHAIN_DESC.SampleDesc.Quality
(like 4 and 4) and while it does run, nothing is displayed (it does error if I put in crazy values like 33 and 2). Does this need to be set somewhere else besides the swap chain description or do shaders interfere with it in some way (I have a basic light and texture shader set up)?
I have a GTX 570, so I know it can support most AA settings. I'm following this set of tutorials, in case it's of any help: http://rastertek.com/tutindex.html