OpacityTexture not working on IOS 15 devices

Hi everyone,

I am having troubles with the opacity map on IOS devices with the latest IOS version (15 at time of writing).
The opacity just doesn’t seem to get applied, whereas the very same code works on IOS devices pre version 15 and windows PCs or android devices.

Here is my example: Babylon.js Playground
Sprial correctly shown on IOS version < 15:
Torus shown on IOS version 15:

Sry for the long loading times, the example is from a larger application and I wasn’t able to simplify the GLBs on my own.

Any ideas what’s going wrong?
Maybe I am just missing a setting which has become required.

Hey there. I’d love to try to help with this but I’m not able to get it to load at all, even on desktop. :frowning_face:

(Tried for about 6 min straight, no alt tabbing)

Wait! Got it to load on phone. Not sure if its only supposed to work on mobile?

We will need a simpler example as we cannot wait 6mins between each test :frowning:

Hi @msDestiny14, well it actually should work on desktop too.
Which operating system / browser did you use?

Concerning loading times, I tried it on my laptop (Windows10 / Chrome) and on some iPads (IOS V14 / V15) and it always loaded between 10-15 seconds.
Not sure in which constellation it would load 6 minutes. :thinking:

@msDestiny14 @Deltakosh on BrowserStack iPhone 11 Pro Safari v15.0, loading time is under 10sec. No idea why this is taking so long for you guys.

We are in the US;)

1 Like

I updated the playground example with much smaller GLBs (300KB / 600 KB), so loading times shouldn’t be an issue anymore. => https://playground.babylonjs.com/#E2FYTU#24

We found out that the issue seems to be related to the usage of KTX2 compressed textures.
The ring on the left side uses “normal” textures, on the right side the textures are compressed.
In IOS15 the opacity map is not correctly applied to the right ring.

1 Like

@Evgeni_Popov or @bghgary might have an idea

Maybe it is a problem when using a combination of compressed textures + sRGB buffers. Try to put this code in the PG and see if that helps (it disables sRGB buffers):

BABYLON.SceneLoader.OnPluginActivatedObservable.add((plugin) => {
    plugin.useSRGBBuffers = false;



@Evgeni_Popov thx for the tip, unfortunately it doesn’t help.

Have you seen this thread ETC2 ktx compression not compatible with macOS? - #9 by DarraghBurke?

Maybe the problem is related to the compression format used in the ktx2 files?

1 Like

Doesn’t repro on my iOS 14 device as expected. I’m upgrading to 15 to see if it will repro.

1 Like

The problem really seems to be related to the compression format of the KTX2 textures.
Our 3D artist re-created the textures in multiple formats as explained in these docs and examples:


After that it worked!
The individual formats contain textures with different colors, so we can see which KTX2 format is used on which device.
Green = png
Blue = dxt
Pink = astc
Red = etc2
…the spiral on the iPad was drawn pink, so it used ASTC, which is what we would have expected.
Here is the updated playground example: https://playground.babylonjs.com/#E2FYTU#35

Anyway this ticket can be closed.
Thank you all for your help!


KTX2 is supposed to work everywhere. If it doesn’t, we should fix it even if KTX1 works.

1 Like

I can repro after upgrading to 15.

1 Like

Thank you very much for all the support you guys are giving us :muscle::pray:
Should we write a bug report in GitHub for this then incl. the reproduction demo etc. from here to have a central place to follow future development around this?

Just FYI: I’m a colleague of @TheHOF and I have also been following the discussion here with much interest.

I guess it would be great to do it on the basis repro @bghgary can probably point you at the right location.

Well, I still haven’t had time to look into why it’s broken. So, it’s hard to know which side is the problem right now. I will try to find time to look into it today or tomorrow.

1 Like

PR: Fix ETC1 decision tree in ktx2Decoder by bghgary · Pull Request #11491 · BabylonJS/Babylon.js (github.com)

See the link for the reason why it broke :slight_smile: