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!