ETC2 ktx compression not compatible with macOS?

I’ve been testing ways to compress my skybox cubemaps (ktx files) using PVRTexTool, as found here:

(first I create a cubemap in PVRTexTool out of 6 images and then compress the cubemap using one of the listed compression methods).

These are the results I got, compatibility-wise, for different platforms with different compression methods:

What strikes me as interesting is that, on my actual macbook pro (intel chip) as well as on Browserstack, ETC2 compression method did not work (the skybox was not rendered). However, it does work on iOS.

Doing a little digging, I’ve found discussions about ETC2 on iOS, such as this:
Do iOS Metal devices have hardware… | Apple Developer Forums, which links to a Metal feature set here:
https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf , which seems to indicate that ETC2 is not support on macs:

However, these seem to indicate otherwise:
https://aras-p.info/blog/2021/01/18/Texture-Compression-on-Apple-M1/
https://aras-p.info/img/blog/2020/texcompr/chart-all-full.html
https://aras-p.info/blog/2020/12/08/Texture-Compression-in-2020/

Can anyone verify that ETC2 does/does not work on macOS? (intel chips).
I feel like it would make sense for Apple to support it on mac if they do on iOS.

For reference, this is the playground I am using to test the different compression methods on different devices:
https://playground.babylonjs.com/#UHQ4FB#17
(#15 at the end of the url is dxt, #16 is etc1, #17 is etc2, #19 is astc, and #20 is pvrtc)

1 Like

@Evgeni_Popov is pretty aligned with KTX so he might be able to help, otherwise we ll reassign to @bghgary who can help after his break :slight_smile:

Sorry, I can’t help here as I don’t have a Mac

Maybe @Cedric would know ? Also @johntdaly7 did you check with khronos ?

@Cedric is also on vacation at the time.

Ohhhhh true I forgot, thanks a lot :slight_smile: would be great to then check with Khronos first

Thanks for the great investigative work, this is very helpful!

As Sebavan said, checking with Khronos would be a good step to take. @bghgary will be back next week so we can definitely follow up with him later

1 Like

only playground #15 works on my MBP. Same on my Windows PC with Chrome. I can confirm #17 works with Safari on my iPhone and my Android 10 phone.
The links you posted on aras-p blog are compression benchmark. It doesn’t tell anything on browser support for loading/displaying those formats.

I wonder if our thread here: Texture Gamma Space + Node Materials - #9 by Valentine is related. We’re also using KTX compression, and we’re finding disparity between how textures are being loaded on Mac and on PC, from Babylon preview build 23 onwards.

Sorry, this issue fell through the cracks. I’m not too sure about Apple support here. I tried to get the playground to work, but it seems the dxt texture file is no longer available.

https://swivel-api-dev.s3.amazonaws.com/skybox_textures/combinedTest/skybox_AtriumOne-dxt.ktx

1 Like