#ifdef GL_ES
	precision mediump float;
#endif

uniform sampler2D	texture_unit;
varying	vec2		texture_uv;		// when passed from vertex shader to fragment shader stage, this gets interpolated
									// so the frag shader's tex uv will be the position of an actual pixel
varying vec4		vertex_color;	
uniform vec4		fill_color;
uniform vec4		outline_color;

void main()
{
	vec4 pixel = texture2D(texture_unit, texture_uv.st);
	
	vec4 outcol;
	
	outcol.rgb = (fill_color.rgb * pixel.b) + (outline_color.rgb * pixel.g);
	
	if (pixel.g == 0.0)
		outcol.a = 0.0;
	else
		outcol.a = pixel.a;
	
	gl_FragColor = outcol;
}