#version 300 es
precision highp float;

layout (location = 0) in vec2 aPos;
layout (location = 1) in highp vec2 aTexturePos;

out vec2 TexCoord;
uniform vec2 gPos;

vec2 absPos;
vec2 pos;

void main() {
	absPos.x = 1.0 / 15.0 * gPos.x - 29.0 / 30.0;
	absPos.y = 1.0 / 9.0 * gPos.y - 17.0 / 18.0;

	pos.x = aPos.x / 15.0 + absPos.x;
	pos.y = aPos.y / 9.0 + absPos.y;

	TexCoord = aTexturePos;
	gl_Position = vec4(pos.x, pos.y, 0.0, 1.0);
}