//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.08.299.0000
//
//   vsa shaderdump19/GDECALS.vso /Fcshaderdump19/GDECALS.vso.dis
//
//
// Parameters:
//
float4 Bones[54] : register(c42);
float4 DecalFade : register(c31);
row_major float4x4 SkinModelViewProj : register(c1);
//
//
// Registers:
//
//   Name              Reg   Size
//   ----------------- ----- ----
//   SkinModelViewProj[0] const_1        1
//   SkinModelViewProj[1] const_2        1
//   SkinModelViewProj[2] const_3        1
//   SkinModelViewProj[3] const_4        1
//   DecalFade         const_31      1
//   Bones[0]             const_42      18
//   Bones[1]             const_43      18
//   Bones[2]             const_44      18
//


// Structures:

struct VS_INPUT {
    float4 position : POSITION;
    float3 normal : NORMAL;
    float3 blendweight : BLENDWEIGHT;
    float4 blendindices : BLENDINDICES;
};

struct VS_OUTPUT {
    float4 position : POSITION;
    float3 texcoord_0 : TEXCOORD0;
};

// Code:

VS_OUTPUT main(VS_INPUT IN) {
    VS_OUTPUT OUT;

#define	weight(v)		dot(v, 1)
#define	sqr(v)			((v) * (v))

    const float4 const_0 = {1, 765.01001, 0, 0};

    float4 q0;
    float3 q10;
    float3 q14;
    float3 q17;
    float3 q8;
    float3 q9;
    float4 r0;

    r0.xyzw = IN.blendindices.zyxw * const_0.y;
    q0.xyzw = (IN.position.xyzx * const_0.xxxz) + const_0.zzzx;
    q14.xyz = mul(float3x4(Bones[0 + r0.w].xyzw, Bones[1 + r0.w].xyzw, Bones[2 + r0.w].xyzw), q0.xyzw);
    q17.xyz = mul(float3x4(Bones[0 + r0.x].xyzw, Bones[1 + r0.x].xyzw, Bones[2 + r0.x].xyzw), q0.xyzw);
    q9.xyz = mul(float3x4(Bones[0 + r0.z].xyzw, Bones[1 + r0.z].xyzw, Bones[2 + r0.z].xyzw), q0.xyzw);
    q8.xyz = mul(float3x4(Bones[0 + r0.y].xyzw, Bones[1 + r0.y].xyzw, Bones[2 + r0.y].xyzw), q0.xyzw);
    r0.w = 1;
    q10.xyz = (IN.blendweight.z * q9.xyz) + ((IN.blendweight.x * q17.xyz) + (q8.xyz * IN.blendweight.y));
    r0.xyz = ((1 - weight(IN.blendweight.xyz)) * q14.xyz) + q10.xyz;
    OUT.position.xyzw = mul(SkinModelViewProj, r0.xyzw);
    OUT.texcoord_0.xy = IN.normal.xy;
    OUT.texcoord_0.z = IN.normal.z * DecalFade.x;

    return OUT;
};

// approximately 31 instruction slots used
