#version 460 core

in vec2 FragTextCoords;

uniform float MinX;
uniform float MaxX;

uniform sampler2D TextTexture;
uniform vec3 TextColor;
uniform bool Marquee;

out vec4 FinalColor;

void main()
{
	float Alpha = texture(TextTexture, FragTextCoords).r;
	if (Marquee && (gl_FragCoord.x < MinX + 10 || gl_FragCoord.x > MaxX - 10))
	{
		Alpha = 0;
	}
	FinalColor = vec4(TextColor, Alpha);
}
