2014-01-20 15:42:38 -05:00
|
|
|
uniform mat4 ModelViewProjectionMatrix;
|
2014-02-20 12:31:00 -05:00
|
|
|
uniform mat4 TextureMatrix;
|
2014-01-20 15:42:38 -05:00
|
|
|
|
2014-02-28 11:29:05 -05:00
|
|
|
#if __VERSION__ >= 130
|
2014-01-20 15:42:38 -05:00
|
|
|
in vec3 Position;
|
|
|
|
in vec2 Texcoord;
|
2014-03-18 20:25:44 -04:00
|
|
|
in vec4 Color;
|
2014-01-20 15:42:38 -05:00
|
|
|
out vec2 uv;
|
2014-03-18 20:25:44 -04:00
|
|
|
out vec4 color;
|
2014-02-28 11:29:05 -05:00
|
|
|
#else
|
|
|
|
attribute vec3 Position;
|
|
|
|
attribute vec2 Texcoord;
|
|
|
|
varying vec2 uv;
|
|
|
|
#endif
|
|
|
|
|
2014-01-20 15:42:38 -05:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2014-02-20 12:31:00 -05:00
|
|
|
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
2014-01-20 15:42:38 -05:00
|
|
|
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
2014-03-18 20:25:44 -04:00
|
|
|
color = Color;
|
2014-01-20 15:42:38 -05:00
|
|
|
}
|