#version 330

in vec2 vUV;

uniform sampler2D u_texture;

uniform vec4 textColor;
uniform vec4 rightColor;

out vec4 fragColor;

void main()
{
    vec2 uv = vUV.xy;
    float text = texture(u_texture, uv).r;
    vec4 gradientColor = mix(textColor, rightColor, uv.x);
    fragColor = vec4(gradientColor.rgb, gradientColor.a*text);
    
}