varying vec2 		texcoord;
uniform sampler2D 	tex;
uniform vec2		ofs;
vec4 				color;

void main()
{
	color=texture2D(tex,texcoord);

	// chromatic aberration
	color.x = texture2D(tex, texcoord.xy-vec2(ofs.x,0.0)).x;    
	color.y = texture2D(tex, texcoord.xy+vec2(0.0,ofs.y)).y;   
	color.z = texture2D(tex, texcoord.xy+vec2(ofs.x,0.0)).z;  

	gl_FragColor.xyz = color.xyz;
}
