Generate Unordered Access View from UTexture2D or RenderTarget2D
I'm wondering if anyone has figured out how write to a rendertarget or UTexture2D from a computeshader via a UAV. Where I am currently sitting is running these on the render thread:
OutTexture is a RenderTarget or Texture2D pointer.
I "think" this has something to do with the Flags that UTexture2D or render target pass when generating thier own FTexture2DRHI but coming from a CUDA with OpenGL inter-op I'm not super familiar with the nuances of ComputeShaders.
If anyone has any insight on this would be appreciated. I'll keep updating as I find things for posterity.
Kind Regards, Aidan
asked Nov 06 '17 at 03:42 AM in Rendering
You have to provide TexCreate_UAV to the texture flags to support calling RHICreateUnorderedAccessView on it later. Presumably this is so drivers can optimize the texture layout based on how it will be accessed.
UTexture doesn't currently support a way to pass this flag to the creation. You could add a bool property which does it.
answered Nov 06 '17 at 04:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here