#version 330 core

layout(location = 0) in vec4 os_Position;
layout(location = 1) in vec3 os_norm;

uniform mat4 mvp;
uniform mat4 ws_to_vs;
uniform mat4 modelmat_IT;

out vec3 ws_norm;
out vec3 vs_pos;
out vec3 vs_norm;

void main()
{
	gl_Position = mvp * os_Position;
	ws_norm = (vec4(os_norm,0) * modelmat_IT).xyz;

	vec4 ws_pos = modelmat_IT * os_Position;
	vs_pos  = (ws_to_vs * ws_pos).xyz;
	vs_norm = (ws_to_vs * vec4(ws_norm,0)).xyz;
}
