The streaming API is really rich, maybe too rich for me, since I failed to do the job with all of them.
I also tried to disable streaming for these textures, but this didn’t help either. Basically, randomly, I get the default checkers texture. I’m probably still missing something key here.
The problem is that this is part of a big project, I must try to create something from scratch, which isn’t trivial.
The problem which is 100% reproducible happens with compute shader and volumetric textures that I can’t send. Unreal has 3 different behaviour depending on how it’s started:
in the editor - only some textures are loaded the first time. Starting the game for a second time, all textures are loaded
shipping - all textures are loaded correctly right away
editor with -game command line (i.e. standalone)- none of the textures are loaded. Starting the game for a second time will not fix this
If I can reproduce the issue with 2d textures, this will be much easier for minimap project.
Our other issue - with the runtime texture baking is too random, it happens in shipping. But it also depends on many textures I can’t send.
The grey checkerboard appearing likely means that a Material is not ready, rather than a texture. You can use the following two functions on the Materials to force them to be loaded as well:
If you are using PSO Precaching and the CVar “r.PSOPrecache.ProxyCreationDelayStrategy” is set to 1, it could also mean that the PSO was not ready. Run the project with the command-line arguments “-logpso -clearPSODriverCache” to get log messages related to PSO Precaching misses.
Keep in mind “FRenderAssetStreamingManager::FastForceFullyResident(…)” does not block - it only enqueues the streaming request.
Can you please try adding this line before the rest of the force loading code? It will update the texture on the GPU, so that the texture has somewhere to stream the MIPs into.
FTextureCompilingManager::Get().FinishAllCompilation(); // add this line
TexSrc->bIgnoreStreamingMipBias = true;
...