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-12-02 10:05:03 -06:00
|
|
|
in vec2 uv;
|
2023-11-22 11:40:35 -06:00
|
|
|
in vec4 color;
|
|
|
|
in vec2 position;
|
|
|
|
out vec4 vtx_color;
|
2023-12-02 10:05:03 -06:00
|
|
|
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;
|
2023-12-02 10:05:03 -06:00
|
|
|
vtx_uv = uv;
|
2023-11-22 12:01:32 -06:00
|
|
|
vec2 pos2d = (vec2(2., -2.) * (position / resolution)) + vec2(-1, 1);
|
|
|
|
gl_Position = vec4(pos2d, 0., 1.);
|
2023-11-22 04:56:46 -06:00
|
|
|
}
|