5

I am trying to get MSAA in DX11 using D3DImage, but is seems, it is not possible, since shared multisampling texture are not allowed, as stated here: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476531(v=vs.85).aspx

Actually, I use the SharpDX implementation of the D3DImage, which works fine for DX11 and DX10 as long one can leave without anti alisasing.

Approaches to solve it are described in this thread: http://sharpdx.org/forum/5-api-usage/1000-d3d11-problem-with-usage-of-texture2d which are not successful. There is yet another thread asking a similar question: Multisampling and Direct3D10 / D3DImage interop

Finally, the question is in fact, if anyone can confirm, that it is definitly NOT possible to use D3DImage for rendering of anti-aliased content from DX10/DX11?

1 Answer 1

6

As said in the microsoft link (tried several times as well), multisampled shared textures are not allowed (actually texture must also have no mip level(s), as additional info)

The only way to share the texture is to create a non multisampled version (same format/parameters), then use

 DeviceContext.ResolveSubresource

in SharpDX to convert the msaa texture into a non multisampled one, then you can share the result of that.

Sign up to request clarification or add additional context in comments.

3 Comments

thanks. alright, but the question is, does it allow me to render using MSAA in DX11? I tried your suggested solution by creating a Texture2D with SampleDescription(4, 16), copying it with DeviceContext.ResolveSubresource and attaching the non-MS copy to D3DImage. But it does not help me to get an anti-aliased output in DX11...
So you create MSAA Texture (with associated render target), render to MSAA render target, resolve MSAA texture to non multisampled one and result is not antialiased?
Yes, it does. I found the error - I didn't set up the depth buffer to the same SampleDescription as the color buffer. Now it renders MSAA! Thanks for helping.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.