#version 150
#extension GL_ARB_explicit_attrib_location : enable

//<attributes>
layout(location = 0) in vec4 inPos;
//</attributes>

uniform mat4 cMat;

vec3 UnPackFloat(float src)
{
  return vec3(fract(src), fract(src * 256.0f), fract(src * 65536.0f));
}
out vec3 col;

void main()
{
	vec4 posOne = cMat * vec4(inPos.xyz,1.0);
	gl_Position = posOne;

	col = UnPackFloat(inPos.w);
}