#version 400 core

in vec4 processedColor;
in vec2 texCoord;
flat in uint outExist;

uniform sampler2D sampler0;

out vec4 outColour;

void main()
{
	if(outExist == 0)
		discard;
	
	vec4 color = texture(sampler0, texCoord);
	
	if(color.w < 0.1f)
		discard;

	outColour = color * processedColor;		
}