#version 450

#include "rounded_tex.common.glsl"

layout(location = 0) out vec2 tex_pos;
layout(location = 1) out vec2 geo_pos;

void main() {
	vec2 size = vec2(data.size_x, data.size_y);
	vec2 pos;
	switch (gl_VertexIndex) {
		case 0: pos = data.pos[0]; tex_pos = data.tex_pos[0]; geo_pos = vec2(size.x, 0.0); break;
		case 1: pos = data.pos[1]; tex_pos = data.tex_pos[1]; geo_pos = vec2(0.0, 0.0); break;
		case 2: pos = data.pos[2]; tex_pos = data.tex_pos[2]; geo_pos = vec2(size.x, size.y); break;
		case 3: pos = data.pos[3]; tex_pos = data.tex_pos[3]; geo_pos = vec2(0.0, size.y); break;
	}
	gl_Position = vec4(pos, 0.0, 1.0);
}
