Create SRV From MediaTexture
I am using a custom compute shader which reads from a SRV. Currently I load a still image via UTexture2D and get the FTexture2DRHIRef via
from which I create a SRV using RHICreateShaderResourceView(..).
Now I want to do the same with a Media Texture, but there doesn't seem to be a simple way to do so, if the textures sink mode is Buffered.
Using AcquireTextureSinkBuffer() to get the raw data and copying it to another Texture seems weird.
Is there a simpler way?
asked Sep 27 '16 at 02:22 PM in Rendering
Perhaps you could try something like this:
Each one of the dereferenced fields may be nullptr, so you have to check accordingly.
Your downcast of the resource to FTexture2DResource is never going to work, because FMediaTextureResource inherits from FTextureResource.
answered Sep 27 '16 at 06:40 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here