#extension GL_EXT_gpu_shader4 : enable

uniform sampler2D Tex;

varying vec2 TexCoord;

void main()
{
	vec4 c = vec4(texture2D(Tex, TexCoord));

	ivec2 pixelCoord = ivec2(gl_FragCoord.xy);
	if (((pixelCoord.x | pixelCoord.y) & 3) == 0) c -= .2 * TexCoord.y; // Dots

	c -= pow(length(TexCoord - .5)* 1.2,1.1) * .1; // Vignette

	gl_FragData[0] = c;
}
