#version 150

in vec3 view_corner;
out vec3 view_dir;
out vec4 view_pos;

void main(void) {
	view_dir = view_corner / view_corner.z;
	view_pos = vec4(qgl_ModelViewMatrix * vec4(qgl_Vertex.xy, 1, 1));
	view_pos /= view_pos.w;
	qgl_FragTexture = qgl_Texture;
	qgl_FragColor = qgl_Color;
	gl_Position = qgl_ftransform();
}
