Accessing Texture assets as UAV from Compute Shaders

Hi everybody, for a project we’re doing, we need to modify Volume Texture assets in a compute shader and then plug them into materials. So what we need is a Texture objects whose resource has the TexCreate_UAV creation flag.

Unluckily, I didn’t find a way to create a Volume Texture (or 2D Texture) assets in a way that would create the respective resource as UAV-targettable.

I know we could create under-the-hood copies of the texture resources (which can be created as UAV-targetable), and copy them back to the Texture Asset, but as we’re already performance bound on texture reads/writes, this would make our performance even worse.

What we did right now is just modifying the engine source like in this pull request :

  • this works as required, but has all the downsides of working on your own custom fork of the engine.

Has anyone faced this and figured out a way to achieve this without copying resources back and forth and without engine modifications?