float4x4 	gWorldViewProj 	: WorldViewProjection;
float3		gLightPosObj;
float3		gCameraPosObj;
float		gTime			: time;
float       gFlateFactor;

struct vertexIn
{
	float4 pos 		: POSITION;
	float3 normal	: NORMAL;
};
 
struct vertexOut
{
	float4 pos		 : POSITION;
	float3 normal	: TEXCOORD0;
	float3 lightDir	: TEXCOORD1;
	float3 viewDir 	: TEXCOORD2;
};
 
vertexOut mainVS(vertexIn input)
{
	vertexOut output = (vertexOut)0;
	input.pos.xyz += input.normal * cos(gTime) * gFlateFactor;
	output.pos = mul(gWorldViewProj, input.pos);
	output.normal = input.normal;

	output.lightDir	= gLightPosObj - input.pos;
	output.viewDir	= gCameraPosObj - input.pos;
	
	return output;
}


