I have a DirectX11 application, which has multisampling / anti-aliasing enabled. However, I want to add an effect that requires a render-to-texture step. When I add this extra step, I lose all anti-aliasing. Here's basically what I'm doing:
1) render scene to texture
2) render texture to screen (with some effect, say blurring or something).
I've tried enabling multisampling on the render texture, but i'm not sure how to get it to work. I've made it use 8 samples and specified
D3D11_DSV_DIMENSION_TEXTURE2DMS, but apparently that step required me to use
Texture2DMS in the shader. But now I don't know how to sample a
Texture2DMS in the shader, because I can't just pass in the textures coordinates, I have to pass in a sample index, which I don't know how to calculate.
How to I use render to texture effects while preserving multisampling / anti-aliasing?