#version 450 core
// Purpose: Package HUD rectangle vertex shader; converts pixel-space colored vertices to NDC.
layout(location=0) in vec2 aPos;
layout(location=1) in vec4 aColor;

uniform vec2 uViewport;

out vec4 vColor;

void main()
{
    vec2 ndc = vec2((aPos.x / uViewport.x) * 2.0 - 1.0,
                    1.0 - (aPos.y / uViewport.y) * 2.0);
    gl_Position = vec4(ndc, 0.0, 1.0);
    vColor = aColor;
}
