TextureCollection updates at runtime

I am wondering how to update texture collections at runtime (such as changing a specific element reference to a new texture object). I noticed UTextureCollection::NotifyMaterials, limited to an editor build. Will RecacheUniformExpressions on all loaded material instances suffice at runtime in a coocked build?

Thanks.

Hi,

Thanks for reaching out. Unfortunately I did not find a lot of information on texture collections, but I will pass this on to someone at Epic with more in-depth knowledge of texture collections.

Thanks,

Sam

Hello,

I should start off by bringing up that UE5 Bindless is still an experimental feature that is unstable on many platforms. Texture Collections in particular do not work correctly with texture streaming in UE5.5. We do not have a concrete ETA on when Bindless will be lifted out of experimental status.

As for your question, you should be able to manipulate the Textures array directly before calling UpdateResources() to force the render-side collection to update.

-Chris Waters

Thanks.

Can you point me to a link/doc/code where I can find that bindless is still experimental and on which platform they are unstable?

UpdateResource is not enough to make the system works, since (I think) material instances do not update their copy of the data without recreating internal buffers ie without calling editor-only UTextureCollection::NotifyMaterials (so my question about RecacheUniformExpressions function).

I can confirm that calling UpdateResource() is not sufficient as the uniform buffers are not updated. I suspect I’m doing something similar: I’m trying to treat a TextureCollection asset as an indirection to the descriptor heap that I can manipulate at runtime and manage higher bindless rendering techniques. To try to address this I’ve so far built my own bookkeeping to effectively mirror the editor work which is done to call NotifyMateirals(), however I am not wild about this approach. I’m going to try an experiment where I make some modifications to something like FSharedBasePassUniformParameters to include an index for a TextureCollection so that I can write a little shader code to use this new “global texture collection” without needing to deal with material uniform buffers.

Can you point me to a link/doc/code where I can find that bindless is still experimental and on which platform they are unstable? Thanks.

Apologies for the delay, Marco. I had to make sure our documentation was correct on this regard. To correct my prior statement, Bindless itself is in Beta and Texture Collections are Experimental. This can be found on our product board: https://portal.productboard.com/epicgames/1\-unreal\-engine\-public\-roadmap/tabs/124\-unreal\-engine\-5\-6