
// ------- UNIFORMS (SHADER CONSTS) -------
cbuffer PMV
{
	mat4	hu_mPMVMatrix;
};

mat4		hu_mMMatrix;

// ------- ATTRIBUTES (VERTEX BUFFER DATA) -------
struct VIn
{
	vec4	a_vPosition: POSITION;
	vec2	a_vTexCoord: TEXCOORD;
};

// ------- INTERPOLATORS (SHADER OUTPUTS) -------
struct PIn
{
	vec4	v_vPosition: SV_POSITION;
	vec2	v_vTex0UV: TEXCOORD;
	vec3	v_vNormal: NORMAL;
};

// ------- FUNCTIONS ------- 
PIn main(VIn input)
{
	PIn output;
	output.v_vPosition = mul(hu_mPMVMatrix, input.a_vPosition);
	vec4 vWorld = mul(hu_mMMatrix, input.a_vPosition);
	output.v_vTex0UV = input.a_vTexCoord;
	output.v_vNormal = 0.001*vWorld.xyz;

	return output;
}
