coderef

EXT_texture_compression_bptc WebGL extensionLimited availability

The EXT_texture_compression_bptc extension for WebGL 1.0 and 2.0 contexts adds the BPTC compressed texture formats to compressedTexImage2D() and compressedTexSubImage2D().

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–92Not supported
93+Supportedsince Aug 31, 2021
Current: 155
Edge
12–92Not supported
93+Supportedsince Sep 2, 2021
Current: 154
Firefox
1–67Not supported
68+Supportedsince Jul 9, 2019
Current: 157
Safari
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27
MobileChrome Android
18–91Not supported
92+Supportedsince Jul 20, 2021
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27

How to use

Not supported in Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: EXT texture compression bptc.

Feature detection

JS · check before using
if ("EXT_texture_compression_bptc" in globalThis) {
  // EXT_texture_compression_bptc is available
} else {
  // load a polyfill or use a fallback
}