#version 300 es
precision highp float;
in vec2 out_tex_coord;
uniform sampler2D tex;
uniform float scale;
uniform vec2 offset;
uniform vec2 size_ratio;
out vec4 color;
void main() {
	vec2 tc = (out_tex_coord-offset)*size_ratio;
	vec4 col = vec4(0,0,0,0);
	if(tc.x <= 1.0 && tc.y <= 1.0 && tc.x >= 0.0 && tc.y >= 0.0) {
		col = texture(tex, tc);
	}
	if(col.a > 0.0) {
		color = col;
	} else {
		discard;
	}
}
