2014-02-12 16:16:10 -05:00
|
|
|
#version 330
|
2014-01-13 17:16:04 -05:00
|
|
|
uniform vec2 center;
|
|
|
|
uniform vec2 size;
|
|
|
|
uniform vec2 texcenter;
|
|
|
|
uniform vec2 texsize;
|
|
|
|
|
|
|
|
in vec2 position;
|
|
|
|
in vec2 texcoord;
|
2014-01-13 20:05:03 -05:00
|
|
|
in uvec4 color;
|
2014-01-13 17:16:04 -05:00
|
|
|
out vec2 uv;
|
|
|
|
out vec4 col;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
col = vec4(color) / 255.;
|
|
|
|
uv = texcoord * texsize + texcenter;
|
|
|
|
gl_Position = vec4(position * size + center, 0., 1.);
|
|
|
|
}
|