axmol/tests/cpp-tests/Content/Shaders/example_Simple.vsh

21 lines
376 B
V Shell
Raw Normal View History

2015-05-26 17:21:35 +08:00
attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
#ifdef GL_ES
varying lowp vec4 v_fragmentColor;
varying mediump vec2 v_texCoord;
#else
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
#endif
2019-03-14 13:43:40 +08:00
uniform mat4 u_MVPMatrix;
2015-05-26 17:21:35 +08:00
void main()
{
2019-03-14 13:43:40 +08:00
gl_Position = u_MVPMatrix * a_position;
2015-05-26 17:21:35 +08:00
v_fragmentColor = a_color;
v_texCoord = a_texCoord;
}