
// ------- UNIFORMS (SHADER CONSTS) -------
cbuffer PMV
{
	mat4	hu_mPMVMatrix;
}
vec2		u_vTextureUVScale;
float		u_fWidth;

// ------- ATTRIBUTES (VERTEX BUFFER DATA) -------
struct VIn
{
	vec4	a_vPosition: POSITION;
	vec2	a_vTexCoord0: TEXCOORD0;
	vec3	a_vTexCoord1: TEXCOORD1;
};

// ------- INTERPOLATORS (SHADER OUTPUTS) -------
struct PIn
{
	vec4	v_vPosition: SV_POSITION;
	vec2	v_vTexCoord: TEXCOORD;
};

PIn main(VIn input)
{
	PIn output;

	output.v_vTexCoord = input.a_vTexCoord0*u_vTextureUVScale;

	vec4 vPos = input.a_vPosition;
	vec3 vShift = input.a_vTexCoord1;
	vPos.xyz += u_fWidth*vShift;
	
	output.v_vPosition = mul(hu_mPMVMatrix, vPos);

	return output;
}
