#ifdef VERTEX_SHADER

	struct VS_INPUT
	{
		float4 Position		: POSITION;
		float4 BlendWeight	: BLENDWEIGHT;
		float4 BlendIndices	: BLENDINDICES;	
		float3 Normal		: NORMAL;
		float4 Color		: COLOR;
		float2 Texture0		: TEXCOORD0;
		float2 Texture1		: TEXCOORD1;
	};

	struct VS_OUTPUT
	{
		float4 Position		: POSITION;
		float4 Color		: COLOR;
		float2 Texture0		: TEXCOORD0;
	};

	float4x4 WorldViewProj;

	VS_OUTPUT vs_main( in VS_INPUT In )
	{
		VS_OUTPUT Out = (VS_OUTPUT) 0;
		Out.Position = mul(vs_skin(In.Position, In.BlendWeight, In.BlendIndices), WorldViewProj);
		Out.Texture0 = In.Texture0;	
		Out.Color = In.Color;
		return Out;
	}

#else

	struct PS_INPUT
	{
		float4 Position		: POSITION;
		float4 Color		: COLOR;
		float2 Texture0		: TEXCOORD0;
	};

	struct PS_OUTPUT
	{
		float4 Color		: COLOR0;
	};


	sampler2D Tex0;

	float4 SurfaceColor;

	PS_OUTPUT ps_main( in PS_INPUT In )
	{
		PS_OUTPUT Out;
		Out.Color = tex2D(Tex0, In.Texture0) * SurfaceColor;
		return Out;
	}

#endif
