2
// Set default precision to medium
4
precision mediump float;
7
uniform mat4 mvp_matrix;
9
attribute vec4 a_position;
10
attribute vec2 a_texcoord;
12
varying vec2 v_texcoord;
17
// Calculate vertex position in screen space
18
gl_Position = mvp_matrix * a_position;
20
// Pass texture coordinate to fragment shader
21
// Value will be automatically interpolated to fragments inside polygon faces
22
v_texcoord = a_texcoord;