layout (location = 0) in vec3 a_position;
layout (location = 1) in vec3 a_normal;
layout (location = 2) in vec3 a_tangent;
layout (location = 3) in vec2 a_uv;

layout (location = 0) out vec2 v_uv;

layout (set = 0, binding = 0) uniform Uniforms {
    float scale;
    vec2 move;
    vec2 tex_start;
    vec2 tex_size;
};

void main() {
    vec2 c = vec2(a_position.x, -a_position.y);
    vec2 pos = c * tex_size * scale + move;

    gl_Position = vec4(pos, 0, 1);
    v_uv = a_uv * tex_size + tex_start;
}