GLTFLoader with basisLoader renders only alpha map on iOS

Hello everyone

I’m loading a compressed .glb scene with .basis textures (via gltfpack) to my website and I’ve run onto the next problem:

All my textures have been resized to square power of 2 sizes (in order to make them work on IOS).

On different scenes where there are approx. 10 textures everything works perfectly, but I have a scene with +20 textures and when I load them on an iPhone there is always the same textures that renders only the alpha map of the image (its a png image converted to .basis).

It is supposed to look like the following image (on pc both edge and chrome, mac both safari and chrome, and android works):

but on ios (iPhone and iPad) it looks like this:

I’ve come to the conclusion that this may have to do with the number of textures because if I delete all textures and leave only the ones that render the alpha map, then they look OK.

Also, if I turn the image to jpg with no alpha, then the textures renders ok. It only happens with png images.

I was wondering if anyone has experienced this and has a workaround, since everything I have tried has failed.

Please note that GLTFLoader, and the glTF format, do not yet support Basis. If you’re using custom code to load models this way, you’ll need to share enough code (and a demo, ideally) so that we can fully reproduce the issue.

Additionally, alpha channels in Basis compressed textures are more complicated than in PNG… it’s entirely possible you’ll need changes to BasisTextureLoader to get all of this working, or to wait until future changes like have landed.

Hello! Thank you for your response.
I am indeed using a custom loader, this one:
It basically checks if the texture is .basis extension and loads it with the threejs BasisLoader.
I’ve uploaded a demo here:
On iOS the transcoding speed is not ideal, it actually takes longer than loading the not optimized moder that is 12mb, so I’m not really sure if I’ll end up using the original model, but still I wanted to give it a try since the compression ratio with basis is impressive and it seems render speed is also improved.
I’ve been reading also about the ktx2 loader, but it seemed to me although basis was not going to be the definitive extension for gpu supercompressed textures there was more documentation about it than ktx2.
Thank you again for your time!

@cristobalbahe @donmccurdy Did you ever figure out a solution here? I have run into the same problem Basis textures with alpha appearing fully black and white on some iPads and older mobile devices when RGB_PVRTC_4BPPV1_Format is used