//position, color and texture

attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texcoord;

uniform mat4 u_PositionMatrix;
uniform mat4 u_textureMatrix;

varying vec2 v_texcoord;
varying vec4 v_color;

void main() {
   gl_Position = u_PositionMatrix * a_position;
   v_texcoord = (u_textureMatrix * vec4(a_texcoord, 0, 1)).xy;
   v_color = a_color;
}