
uniform sampler2D Texture;
varying vec2 v_texCoord;

uniform float play_time;
uniform vec2 sprite_size;

float rand(vec2 co)
{
    return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}

void main()
{    
	vec4 color = texture2D(Texture, v_texCoord);

/*	vec2 center = vec2(0.5,0.5);
	vec2 pixel_size = vec2(1.0/sprite_size.x, 1.0/sprite_size.y);


	//if(color.a > 0)
	//{
		//float alpha = rand(vec2(play_time + v_texCoord.x, play_time + v_texCoord.y))*0.5;
		//color = vec4(1, 1, 1, alpha + 0.5);

	vec2 dir = normalize(center - v_texCoord);

	for(float i = 0.0; i < 5.0; i+=1.0)
	{
		color += texture2D(Texture, v_texCoord + dir*pixel_size*i);
	}*/

	//color /= 5.0;

	//} 

	gl_FragColor = color;
}