// Vertex Shader for Worldpos Rendering

uniform mat4 mViewMatrix;
uniform mat4 mProjectionMatrix;
uniform vec4 mVolumeSize;

void main()
{
	// default vertex transformation
	mat4 viewProjection =  mProjectionMatrix * mViewMatrix;
	gl_Position = viewProjection * gl_Vertex;

	// the volume texture coordinats used in the fragment
	//gl_TexCoord[0] = (worldPos / (2.0*mVolumeSize)) + vec4(0.5, 0.5, 0.5, 0.0);	
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_TexCoord[1] = gl_MultiTexCoord1;
	gl_TexCoord[2] = gl_MultiTexCoord2;
	gl_TexCoord[3] = gl_MultiTexCoord3;
	gl_TexCoord[4] = gl_MultiTexCoord4;
	gl_TexCoord[5] = gl_MultiTexCoord5;
	gl_TexCoord[6] = gl_MultiTexCoord6;
	gl_TexCoord[7] = gl_MultiTexCoord7;
	//gl_FrontColor = worldPos;
}