# KTX vs KTX2 format

**URL:** <https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502>\
**Category:** Questions\
**Created:** [January 18, 2023, 8:08pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502 "2023-01-18T20:08:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Jekeli](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jon_jekeli/32/1697_2.png) [@Jon\_Jekeli](https://forum.babylonjs.com/u/Jon_Jekeli)\
**Post date:** [January 18, 2023, 8:08pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502/1 "2023-01-18T20:08:15Z")

</div>

There seem to be two different articles about using KTX format textures.

> **[Multi-Platform Compressed Textures | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/mutliPlatTextures)**
>
> Learn all about multi-platform compressed textures in Babylon.js.

> **[KTX2 Compressed Textures | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/materials/using/ktx2Compression)**
>
> Learn advanced texture compression with KTX2 support in Babylon.js.

One described a KTX2 format, which seems to be a browser standard. Another describes ktx files that seem more to be wrappers around other formats (astc-ktx, etc).  
Is KTX2 supported across all browsers? If so, I’m assuming that is the preferred one to use?

Thanks!

---

<div class="post-metadata">

**Author:** ![br-matt](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/br-matt/32/22436_2.png) [@br-matt](https://forum.babylonjs.com/u/br-matt)\
**Post date:** [January 18, 2023, 10:23pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502/2 "2023-01-18T22:23:37Z")

</div>

KTX2(and .basis) have this “ **Universal supercompression** ” Meaning that once downloaded, a worker thread **transcodes** them to a real compression format. Meaning it picks the optimal format for the hardware the person is viewing with and that is what’s sent back to main thread

The first article is talking about device specific the ‘older’ way. Which is you offline generate a version of a texture for each different CPU (mytex-astc.ktx, mytex-etc2.ktx, mytex-pvrtc.ktx etc etc ). Babylon for instance then letting you know which suffix to download.

KTX2 is definitely the modern and recommended solution. For ALL cases, like constantly/en masse` during runtime, the jury is still out, with some users at least 😮‍💨

---

<div class="post-metadata">

**Author:** ![Jon\_Jekeli](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jon_jekeli/32/1697_2.png) [@Jon\_Jekeli](https://forum.babylonjs.com/u/Jon_Jekeli)\
**Post date:** [January 18, 2023, 10:44pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502/3 "2023-01-18T22:44:37Z")

</div>

Is there a way to tell if the browser supports ktx2? Aka is there is a chance that on some old browser I’ll pass a ktx2 file to Babylon and it will error out?

---

<div class="post-metadata">

**Author:** ![br-matt](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/br-matt/32/22436_2.png) [@br-matt](https://forum.babylonjs.com/u/br-matt)\
**Post date:** [January 18, 2023, 10:54pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502/4 "2023-01-18T22:54:19Z")

</div>

I think as long as it supports ES6 Promises and WebAssembly/workers… so basically, no ie11 😂

---

<div class="post-metadata">

**Author:** ![Jon\_Jekeli](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jon_jekeli/32/1697_2.png) [@Jon\_Jekeli](https://forum.babylonjs.com/u/Jon_Jekeli)\
**Post date:** [January 19, 2023, 2:12pm UTC](https://forum.babylonjs.com/t/ktx-vs-ktx2-format/37502/5 "2023-01-19T14:12:18Z")

</div>

Perfect thank you!
