DOMException: The source image could not be decoded when loading high res. textures with GLTF loader

Hi there,

I’m trying to load multiple objects using the GLTF loader with high resolution textures (8192 x 8192). All the models load fine with their textures on my mac but on windows I get a “DOMException: The source image could not be decoded” error, until the browser crashes. Could this be a bug? My windows machine is more powerful than my mac, so I find weird it can’t handle higher res. textures. I believe it is a texture problem because when reducing the texture resolution to 4096 all the models load fine without error. Anyone else ran into this problwm?

Cheers!

Those 8K textures use about 360 MB of memory apiece, you’re going to hit limits of one sort or another very quickly that way. If you need higher resolution at lower memory cost you could try converting them to .ktx2. But in general, I’d look for ways to avoid using textures larger than 2K-4K.

Thanks for the reply! Yes indeed, thanks for the advice, I think i’m better off sticking to 4K for now!