#version 460

layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec2 inUv;

layout(location = 0) out vec2 outUv;

layout(push_constant) uniform AspectRatio {
    float uAspectRatio;
};

void main()
{
    outUv = inUv;

    vec2 position = inPosition;
    if (uAspectRatio > 1)
    {
        position.x *= uAspectRatio;
    } else
    {
        position.y /= uAspectRatio;
    }
    
    gl_Position = vec4(inPosition, 0.0, 1.0);
}
