Determining which vertex of a triangle one is computing in openGL ES vertex shader -
i'm writing webgl program draws bunch of triangles screen. i'm using indirect addressing, this: gl.drawelements(gl.triangles, list.length, gl.unsigned_short, 0); is there way vertex shader know vertex of triangle processing? (among 3 vertices in order given list, i.e., first, second or last) you can use additional integer attribute in stride alongside vertex coordinates, texture coordinates, normal, etc. check id of vertex.