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

18 lines
310 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;
in vec2 uv;
2023-11-22 11:40:35 -06:00
in vec4 color;
in vec2 position;
out vec4 vtx_color;
out vec2 vtx_uv;
2023-11-22 04:56:46 -06:00
void main() {
2023-11-22 11:40:35 -06:00
vtx_color = color;
vtx_uv = uv;
vec2 pos2d = (vec2(2., -2.) * (position / resolution)) + vec2(-1, 1);
gl_Position = vec4(pos2d, 0., 1.);
2023-11-22 04:56:46 -06:00
}