0ad/binaries/data/mods/public/shaders/glsl/minimap.vs
historic_bruno 7cb4c0dcfc Partial fix of minimap rendering for GLES.
Replaces glBegin/End with glDrawArrays, GL_QUADS with GL_TRIANGLES, and
modifies shaders as needed.

This was SVN commit r14153.
2013-11-12 01:31:52 +00:00

36 lines
721 B
GLSL

#version 110
#if MINIMAP_BASE || MINIMAP_LOS
attribute vec3 a_vertex;
attribute vec2 a_uv0;
varying vec2 v_tex;
#endif
#if MINIMAP_POINT
attribute vec2 a_vertex;
attribute vec3 a_color;
varying vec3 color;
#endif
#if MINIMAP_LINE
attribute vec2 a_vertex;
#endif
void main()
{
#if MINIMAP_BASE || MINIMAP_LOS
gl_Position = gl_ModelViewProjectionMatrix * vec4(a_vertex, 1.0);
vec4 temp = gl_TextureMatrix[0] * vec4(a_uv0, 0.0, 0.0);
v_tex = temp.xy;
#endif
#if MINIMAP_POINT
gl_Position = gl_ModelViewProjectionMatrix * vec4(a_vertex, 0.0, 1.0);
color = a_color;
#endif
#if MINIMAP_LINE
gl_Position = gl_ModelViewProjectionMatrix * vec4(a_vertex, 0.0, 1.0);
#endif
}