#version 430

uniform mat4 cam_mat;
uniform mat4 pick_mat;
layout(location=0) in vec3 vtx_Pos;
smooth out vec4 bary;

void main(void) {
	vec4 pos = vec4(vtx_Pos, 1.0);
	pos.x *= 0.25;
	pos.x -= 0.125 * (1.0-pos.y);
	pos.y *= 0.25 * 0.8660254037844386;
	gl_Position = cam_mat * pick_mat * pos;
	bary = vec4((1.0f - vtx_Pos.x) * vtx_Pos.y, vtx_Pos.x * vtx_Pos.y, (1.0 - vtx_Pos.y), 1.0f);
}
