aboutsummaryrefslogtreecommitdiff
path: root/shaders/rect.vert
blob: de74fa7ad303fd28a3e71c6d63d5288670ef2da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#version 330 core

/* The vertex shader is trivial, but forwards scaled UV coordinates (in pixels)
   to the fragment shader for drawing the border. */

uniform mat4 MVP;
uniform vec2 u_size;

in vec2 v_position;

noperspective out vec2 f_uv;

void
main()
{
	f_uv        = v_position * u_size;
	gl_Position = MVP * vec4(v_position, 0.0, 1.0);
}