kubi/kubi-ui-glium/shaders/vertex.vert

15 lines
266 B
GLSL
Raw Normal View History

2023-11-22 04:56:46 -06:00
#version 300 es
precision highp float;
2023-11-22 11:40:35 -06:00
2023-11-22 07:23:48 -06:00
uniform vec2 resolution;
2023-11-22 11:40:35 -06:00
in vec4 color;
in vec2 position;
out vec4 vtx_color;
2023-11-22 04:56:46 -06:00
void main() {
2023-11-22 11:40:35 -06:00
vtx_color = color;
vec2 pos2d = (vec2(2., -2.) * (position / resolution)) + vec2(-1, 1);
gl_Position = vec4(pos2d, 0., 1.);
2023-11-22 04:56:46 -06:00
}