cancel
Showing results for 
Search instead for 
Did you mean: 

Graphics Cards

tovino77
Journeyman III

How to convert/copy NV12 ID3D11Texture2D to RGB ID3D11Texture2D?

I seem to be struggling to do something that I feel should be rather simple: copying an NV12 texture to a RGB texture. Here are some more details:

Im creating a plugin for the Unity game engine. Unity provides the texture that I must eventually put my data in to render it in the scene. Unity does not provide a NV12 texture format, so I have to convert my NV12 texture to RGB. I know that I can do this in the shader, the issue I am having is how to even get the data from the NV12 ID3D11Texture2D to the RGB texture which Unity provides to even run a shader on it. Namely, if they were both the same format, I could simply do a CopySubresourceRegion or something. However, that doesn't work because the textures are different formats.

I want to keep everything on the gpu. If I didn't I know I could map the nv12 texture, and copy the two planes of the nv12 texture to the rgb texture (or to two separate textures, an R8 and an R16, and then combine them in a shader), however, I need to avoid mapping.

Any help or resources would be greatly appreciated!

0 Likes
1 Reply

Your question is beyond my knowledge and you seem to be a developer. Thus I would post your question at Devgurus‌.  The Moderator will then determine which Forum is best to post at..

For New Users/Developers you will need to start here first: Newcomers Start Here