2014-01-11 17:57:48 -05:00
|
|
|
uniform mat4 ModelViewProjectionMatrix;
|
2014-02-26 19:13:23 -05:00
|
|
|
uniform mat4 TextureMatrix =
|
|
|
|
mat4(1., 0., 0., 0.,
|
|
|
|
0., 1., 0., 0.,
|
|
|
|
0., 0., 1., 0.,
|
|
|
|
0., 0., 0., 1.);
|
2014-01-11 17:57:48 -05:00
|
|
|
|
2014-02-28 11:29:05 -05:00
|
|
|
#if __VERSION__ >= 130
|
2014-01-11 17:57:48 -05:00
|
|
|
in vec3 Position;
|
2014-01-11 19:26:18 -05:00
|
|
|
in vec2 Texcoord;
|
2014-01-25 19:33:13 -05:00
|
|
|
in vec2 SecondTexcoord;
|
2014-01-11 19:26:18 -05:00
|
|
|
out vec2 uv;
|
2014-01-25 19:33:13 -05:00
|
|
|
out vec2 uv_bis;
|
2014-02-28 11:29:05 -05:00
|
|
|
#else
|
|
|
|
attribute vec3 Position;
|
|
|
|
attribute vec2 Texcoord;
|
|
|
|
attribute vec2 SecondTexcoord;
|
|
|
|
varying vec2 uv;
|
|
|
|
varying vec2 uv_bis;
|
|
|
|
#endif
|
|
|
|
|
2014-01-11 17:57:48 -05:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
2014-02-26 19:13:23 -05:00
|
|
|
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
2014-01-25 19:33:13 -05:00
|
|
|
uv_bis = SecondTexcoord;
|
2014-01-11 17:57:48 -05:00
|
|
|
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
|
|
|
}
|