coderef

WEBGL_compressed_texture_astc WebGL extensionBaseline · Widely available

The WEBGL_compressed_texture_astc extension for WebGL 1.0 and 2.0 contexts adds the Adaptive Scalable Texture Compression format to compressedTexImage2D() and compressedTexSubImage2D().

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–46Not supported
47+Supportedsince Dec 1, 2015
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari
1–11.1Not supported
12+Supportedsince Sep 17, 2018
Current: 27
MobileChrome Android
18–46Not supported
47+Supportedsince Dec 2, 2015
Current: 155
Firefox Android
4–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari iOS
1–11.3Not supported
12+Supportedsince Sep 17, 2018
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: WEBGL compressed texture astc.

Feature detection

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

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
WEBGL_compressed_texture_astc47795312475312
WEBGL_compressed_texture_astc.getSupportedProfiles47795312475312