float4x4 View : register(c4);
float4x4 Proj : register(c8);

// transformations
float4x4 WorldArray[20];

struct VS_OUTPUT{
    float4 Pos				: POSITION;
    float2 Tex				: TEXCOORD0;
};

struct VS_INPUT{
    float3 Pos              : POSITION;
    float BlendIndices      : BLENDINDICES;

    float3 Normal           : NORMAL;
    float2 Tex              : TEXCOORD0;
};

VS_OUTPUT main(const VS_INPUT Input){
	float3 Pos = mul(float4(Input.Pos, 1), WorldArray[Input.BlendIndices]);

	Pos = mul(float4(Pos, 1), (float4x3)View);

	VS_OUTPUT Out;
    Out.Pos = mul(float4(Pos, 1), Proj);
    Out.Tex = Input.Tex;
    return Out;
}
