#version 330 core

layout(location = 0) in vec2 a_position;
layout(location = 1) in vec2 a_texcoord;
layout(location = 2) in vec4 a_rect_bounds;  // (x0, y0, x1, y1)
layout(location = 3) in float a_radius;

uniform mat4 u_projection;

out vec2 v_uv;
out vec2 v_frag_pos;
out vec4 v_rect_bounds;
out float v_radius;

void main() {
    gl_Position = u_projection * vec4(a_position, 0.0, 1.0);
    v_uv = a_texcoord;
    v_frag_pos = a_position;
    v_rect_bounds = a_rect_bounds;
    v_radius = a_radius;
}
