WEBGL_draw_buffers WebGL extensionLimited availability
The WEBGL_draw_buffers extension for WebGL 1.0 contexts enables a fragment shader to write to several textures, which is useful for deferred shading, for example.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155Edge
12–16Not supported
17+Supportedsince Apr 30, 2018
Current: 154Firefox
1–27Not supported
28+Supportedsince Mar 18, 2014
Current: 157Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27How to use
Not supported in Chrome Android, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: WEBGL draw buffers.
Feature detection
JS · check before using
if ("WEBGL_draw_buffers" in globalThis) {
// WEBGL_draw_buffers is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| WEBGL_draw_buffers | 36 | 17 | 28 | 9 | ✕ | ✕ | 15 |
| WEBGL_draw_buffers.drawBuffersWEBGL | 36 | 17 | 28 | 9 | ✕ | ✕ | 15 |