#version 330

layout (location = 0) out vec4 FragColor;
layout (location = 1) out vec4 Bright;
in vec2 texcoord;

uniform sampler2D img;
uniform vec3 color;

void main(){
    vec4 col = texture(img, texcoord);

    if(col[0] > 0.5){
       FragColor = vec4(color, 0.0);
    }
    else{
       FragColor = vec4(color, 1.0);
       Bright    = vec4(0.0, 0.0, 0.0, 1.0);
    }
}