uniform mat4 mat_camera, mat_project, mat_object2world;

attribute vec3 va_position;

varying vec3 viewPos;

void main(void) {
	vec4 posVS = mat_camera * (mat_object2world * vec4(va_position, 1.0));
	viewPos = posVS.xyz;
	
	gl_Position = mat_project * posVS;
	gl_FrontColor = gl_Color;	
}