#version 330 core

precision lowp float;

uniform sampler2D texture;

in struct
{
	vec2 texCoord;
	vec2 texCoord2;
	float blend;
	vec4 color;
}fInfo;

out vec4 fragColor;

void main()
{
	if(fInfo.blend > 0.01)
	{
		vec4 f1 = texture2D(texture, fInfo.texCoord);
		vec4 f2 = texture2D(texture, fInfo.texCoord2);
		fragColor = mix(f1,f2,fInfo.blend);
	}else
		fragColor = texture2D(texture, fInfo.texCoord);
	fragColor *= fInfo.color;
}