#version 330 core

in vec2 vUV;
out vec4 FragColor;

uniform sampler2D uTex;
uniform vec2 uUVMin;
uniform vec2 uUVMax;

void main()
{
    vec2 rotatedUV = vec2(vUV.y, 1.0 - vUV.x);
    vec2 uv = mix(uUVMin, uUVMax, rotatedUV);

    vec4 color = texture(uTex, uv);

    if (color.a < 0.01)
        discard;


    FragColor = color;
}
