#version 330 core

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

uniform mat4 mvp;
uniform mat4 os_to_ws;
uniform mat4 ws_to_vs;

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

void main()
{
	//os_Position.xyz += 0.5 * os_norm;
	vec4 os_pos = os_Position;
	os_pos.xyz += 0.05*os_norm; //TODO: should depend on projected size...
	gl_Position = mvp * os_pos;

	//ws_norm = (vec4(os_norm,0) * os_to_ws).xyz;
	//ws_norm = (os_to_ws * vec4(os_norm,0)).xyz;

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