I am trying to do instancing in WebGL 2. I want to use the built-in variable gl_InstanceID
to index into a uniform float array.
I get the following error:
glDrawElementsInstancedANGLE: attempt to draw with all attributes having non-zero divisors
Is the only instancing allowed in WebGL 2 instancing with vertex attributes (instanced arrays)?
Also, is the spec the only definitive place to find out about these capabilities?
The spec says it's based on the OpenGL ES 3.0 spec
Unfortunately it looks like they forgot to specify that at least one attribute must have a non-zero divisor which is different from OpenGL ES 3.0. I filed a bug
The part that needs to be added is