
uniform sampler2D texture;
uniform float scaleX, scaleY;

void main(void) {
	vec2 xy = gl_TexCoord[0].xy;

	vec2 xy2 = vec2(0,0);
	float fx = 512.0*(scaleX);
	float fy = 512.0*(scaleY);
	xy2.x = float(int(xy.x*fx));
	xy2.x = xy2.x / fx;
	xy2.y = float(int(xy.y*fy));
	xy2.y = xy2.y / fy;

	gl_FragColor = texture2D(texture,xy2);
}

