#version 330

layout (location = 0) in vec2 in_pos;
layout (location = 1) in vec2 in_uv;

out vec2 vUV;

uniform mat4 model;
uniform mat4 projection;
uniform vec2 scale;
uniform vec2 offset;

void main()
{
    vUV         = in_uv.xy;
    vec2 scaledPos = in_pos * scale + offset;
    gl_Position = projection * model * vec4(scaledPos, 0.0, 1.0);
}