vec4 a_position ; inch VEC4 A_color;
Out VEC4 V_color;
void== U_mvpmatrix * a_position;}
Above is a vertex shader code.
+ ES
Appears in the first line of the vertex shader file, indicating that the shaded language version is 3.0 (Shading Language 3.0)
Uniform mat4 U_mvpmatrix;
Creates a uniform variable U_mvpmatrix that is used to store the combined model view projection matrix.
inch VEC4 a_position; in Vec4 a_color;
Input to the vertex shader as a property of the vertex shader.
A_position is the position property of the input vertex, and A_color is the color attribute of the input vertex.
out VEC4 v_color;
Output vertex color
Gl_position is a built-in auto-declaration variable that the shader must write to the transform location to pass to it.
Void Main is the entry point for a vertex or fragment shader.
V_color = A_color;
We read the Vertex property input A_color write its vertex color output v_color.
gl_position = U_mvpmatrix * a_position;
Change the position of vertices by gl_position.
OpenGL ES 3.0 vertex shader (ii)