Hi, how should i load a large number of images as immutable textures and connect it to stride without making the CPU burn

using stride and imgui to create a software for an image archive and learning vvvv gamma by doing it, the computer shouldnt process these images in every instance and give a heartattack to the cpu. how should i use gpu

You have to preload all your images onto the GPU. Once you show a texture in the renderer, the GPU will load it into VRAM. One trick for example is, to display the images, you want to preload, on simple geometry with scaling = 0 in front of your camera. This might take some time, you can look into the taskmanager and see the ram fill up. After you do this once you should be fine. Of course you are limited by the size of your VRAM, and images in there are raw, so jpeg and bmp take the same space.

1 Like

okay u should share some references or example patches for me to get familiar with all these

check out the helppatch “explanation overview materials” and use a plane instead of the teapod. use “texturematerial” for the non pbr pipeline, with flat shading.

check out “HowTo Manage loading and unloading of textures” in the helpbrowser.

How does the TextureReader (Async) and FileTexture complement each other, given that the latter has more settings?
Also I was under the impression that FileTexture is async as well and releases a texture as well, at least by looking at my VRAM with GPU-Z and loading 100+ textures.

Edit: also FileTexture doesn’t need to be connected downstream in order to load everything like it was in beta

1 Like

lost some forum posts from @incomastate

TextureReader has two differences from FileTexture. It loads textures faster, going directly from the hard disc to VRAM. But it doesn’t generate MipMaps (which costs CPU). So When loading textures with TextureReader you should avoid displaying them smaller than their pixel size and not display them skewed on 3d objects.
The second difference is that it doesn’t depend on the Stride asset pipeline which means the exported exe doesn’t depend on MSBuild being installed on the target machine. When no other nodes from the Stride asset pipeline are used, of course.

So it’s main purpose is the ImagePlayer which usually displays pixel perfect high res fullscreen textures and has to load them as fast as possible.

Yes, this is correct.


If the files already contain Mips they are loaded though.


Right, good point, if you prepare *.dds files with mipmaps they are loaded by the TextureReader.

Just remembered a 3rd difference. The FileTexture will cache decoded Textures in the asset database on disk. that makes loading the same texture a second time faster than with TextureReader if it is *.jpg, *.png, or other compressed formats because no decompression has to be done the second time it is seen.

1 Like

Thanks for this extensive explanation!

Is this also true for exported applications?


1 Like