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

uniform vec2 uViewport;

out vec2 vUv;
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, aPos.z, 1.0);
    vUv = aUv;
    vColor = aColor;
}
