#version 330

uniform mat4 viewT;

layout(location = 0) in vec4 position;

out vec3 vPos;
out vec3 dir;

void main(void) {
	float tanFOV = tan(radians(35.0));
	vec3 x = viewT[0].xyz * tanFOV;
	vec3 y = viewT[1].xyz * tanFOV*0.75;
	vPos = -viewT[2].xyz;
	dir = position.x*x + position.y*y + vPos;
	gl_Position = position;
}