This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2016.
The ANGLE_instanced_arrays.vertexAttribDivisorANGLE() method of the WebGL API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawArraysInstancedANGLE() and ext.drawElementsInstancedANGLE().
Note: When using WebGL2, this method is available as gl.vertexAttribDivisor() by default.
vertexAttribDivisorANGLE(index, divisor)
indexA GLuint specifying the index of the generic vertex attributes.
divisorA GLuint specifying the number of instances that will pass between updates of the generic attribute.
None (undefined).
const ext = gl.getExtension("ANGLE_instanced_arrays");
ext.vertexAttribDivisorANGLE(0, 2);
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
vertexAttribDivisorANGLE |
30 | 12 | 47 | 17 | 8 | 30 | 47 | 18 | 8 | 2.0 | 4.4 | 8 |
ext.drawArraysInstancedANGLE()ext.drawElementsInstancedANGLE()WebGLRenderingContext.drawArrays()WebGLRenderingContext.drawElements()WebGL2RenderingContext.drawArraysInstanced()WebGL2RenderingContext.drawElementsInstanced()WebGL2RenderingContext.vertexAttribDivisor()
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE