coderef

WEBGL_compressed_texture_etc WebGL extensionBaseline · Widely available

The WEBGL_compressed_texture_etc extension for WebGL 1.0 and 2.0 contexts adds many ETC2 and EAC compressed texture formats to compressedTexImage2D() and compressedTexSubImage2D().

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

Browser support

DesktopChrome
1–62Not supported
63+Supportedsince Dec 6, 2017
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–54Not supported
55+Supportedsince Aug 8, 2017
Current: 157
Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27
MobileChrome Android
18–62Not supported
63+Supportedsince Dec 5, 2017
Current: 155
Firefox Android
4–50Not supported
51+Supportedsince Jan 24, 2017
Current: 157
Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
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 etc.

Feature detection

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