#version 330
layout (location = 0) out vec4 FragColor;

in vec2 textcoord;
in vec4 colour;
uniform sampler2D img;

void main(){
   float red = texture(img, textcoord).r;
   if(red > 0.5){
      FragColor = colour;
   }
   else{
      FragColor = vec4(0.0, 0.0, 0.0, 1.0);
   }
}