What is the best file format in terms of caching?

Which would be best in terms of caching files like textures…
glb, or gltf with the textures in a folder, or embeded gltf textures?

which is best for web optimsation ?

I generally store asset dedicated textures that are unique for an asset with the full asset file, and textures that i reuse (most common tiled ones) linked externally like glTF can load them externally.

It also depends on the kind of asset, some things you can “package” in one bigger container, however if you package textures or generally extract them from a custom buffer, you (or glTF) needs to put them in a blob that needs to be loaded by the browser image decode again. This is different for KTX for instance as it’s not a regular image format and just the buffers.

If it’s about a game map for instance it makes more sense to embed them in GLB, unless for instance you have multiple maps that will reuse the same textures. Sharing textures a lot will obviously improve memory and caching a lot obviously rather than duplicating them embedded.

1 Like