uniform sampler2D texture;
uniform float contrast = 1.0;
uniform float brightness = 1.0;



void main() 
{
   	vec2 coord = gl_TexCoord[0].xy;
   
	vec4 colors = texture2D(texture,coord);
	colors.rgb /= colors.a;
		  colors.rgb += brightness;
	colors.rgb = ((colors.rgb - 0.5) * max(contrast + 1.0, 0.0)) + 0.5;

	colors.rgb *= colors.a;





	gl_FragColor = colors;
}