2014-12-18 16:09:29 +08:00
|
|
|
attribute vec4 a_position;
|
|
|
|
attribute vec2 a_texCoord;
|
|
|
|
attribute vec3 a_normal;
|
2014-12-19 15:31:06 +08:00
|
|
|
varying vec2 v_texture_coord;
|
2014-12-18 16:09:29 +08:00
|
|
|
varying vec3 v_normal;
|
2019-02-15 14:30:10 +08:00
|
|
|
|
|
|
|
uniform mat4 u_MVPMatrix;
|
|
|
|
uniform mat3 u_NormalMatrix;
|
|
|
|
|
2014-12-18 16:09:29 +08:00
|
|
|
void main(void)
|
|
|
|
{
|
2019-02-15 14:30:10 +08:00
|
|
|
gl_Position = u_MVPMatrix * a_position;
|
2014-12-19 15:31:06 +08:00
|
|
|
v_texture_coord = a_texCoord;
|
|
|
|
v_texture_coord.y = (1.0 - v_texture_coord.y);
|
2019-02-15 14:30:10 +08:00
|
|
|
v_normal = u_NormalMatrix *a_normal;
|
2014-12-18 16:09:29 +08:00
|
|
|
}
|