2020-09-21 03:57:54 +00:00
|
|
|
#ifdef TW_MODERN_GL
|
|
|
|
layout (location = 0) in vec2 inVertex;
|
|
|
|
layout (location = 1) in vec4 inVertexColor;
|
|
|
|
layout (location = 2) in vec3 inVertexTexCoord;
|
|
|
|
#endif
|
|
|
|
|
2020-08-29 10:10:38 +00:00
|
|
|
uniform mat4x2 gPos;
|
|
|
|
|
2020-09-21 03:57:54 +00:00
|
|
|
#ifdef TW_MODERN_GL
|
|
|
|
#ifdef TW_TEXTURED
|
|
|
|
noperspective out vec3 oTexCoord;
|
|
|
|
#endif
|
|
|
|
noperspective out vec4 oVertColor;
|
|
|
|
#endif
|
|
|
|
|
2020-08-29 10:10:38 +00:00
|
|
|
void main()
|
|
|
|
{
|
2020-09-21 03:57:54 +00:00
|
|
|
#ifdef TW_MODERN_GL
|
|
|
|
gl_Position = vec4(gPos * vec4(inVertex, 0.0, 1.0), 0.0, 1.0);
|
|
|
|
#ifdef TW_TEXTURED
|
|
|
|
oTexCoord = inVertexTexCoord;
|
|
|
|
#endif
|
|
|
|
oVertColor = inVertexColor;
|
|
|
|
#else
|
2020-08-29 10:10:38 +00:00
|
|
|
gl_Position = vec4(gPos * vec4(gl_Vertex.xy, 0.0, 1.0), 0.0, 1.0);
|
|
|
|
#ifdef TW_TEXTURED
|
|
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
|
|
#endif
|
|
|
|
gl_FrontColor = gl_Color.rgba;
|
|
|
|
gl_BackColor = gl_Color.rgba;
|
2020-09-21 03:57:54 +00:00
|
|
|
#endif
|
2020-08-29 10:10:38 +00:00
|
|
|
}
|