Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multisampling (MSAA) for DirectX11/DirectX10 with D3DImage shared resource

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?

like image 554
DerPrzem Avatar asked Nov 05 '12 19:11

DerPrzem


1 Answers

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.

like image 50
mrvux Avatar answered Sep 20 '22 20:09

mrvux