quakeforge/libs/video/renderer/glsl/quakeico.vert
Bill Currie 151cc05882 Add support for vertex colors.
As I need to control the alpha, they're sent as rgba rather than quake
palette indices. Text works well. All other 2d stuff does not :(.
2011-12-28 09:04:26 +09:00

21 lines
389 B
GLSL

uniform mat4 mvp_mat;
/** Vertex position.
x, y, s, t
\a vertex provides the onscreen location at which to draw the icon
(\a x, \a y) and texture coordinate for the icon (\a s=z, \a t=w).
*/
attribute vec4 vertex;
attribute vec4 vcolor;
varying vec4 color;
varying vec2 st;
void
main (void)
{
gl_Position = mvp_mat * vec4 (vertex.xy, 0.0, 1.0);
st = vertex.zw;
color = vcolor;
}