Skip to content
Advertisement

Tag: vertex-shader

Using mat4 attribute in WebGL2

I am trying to pass a 4×4 matrix as an attribute to WebGL2 vertex shader. After following closely this SO answer, I am stuck with wrapping my head around why I can’t successfully render and get a glDrawArrays: attempt to access out of range vertices in attribute 0 error in my console. It is my understanding that mat4 is represented

Advertisement