
layout(location = 0) in vec3 os_pos;
layout(location = 1) in vec3 os_norm;


uniform mat4 vp;
uniform mat4 modelmat;
//uniform mat4 modelmatIT;
uniform vec4 ws_lightpos;

out vec3 ws_norm;
out vec3 ws_lightvec;


void main()
{	
	vec4 ws_pos = modelmat * vec4(os_pos,1);
	gl_Position =  vp * ws_pos;

	//ws_norm = normalize( ( modelmatIT * vec4(os_norm,0) ).xyz );
	ws_norm = normalize( ( modelmat * vec4(os_norm,0) ).xyz );
	
	ws_lightvec = ws_lightpos.xyz - ws_pos.xyz;
}
