//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.08.299.0000
//
//   vsa shaderdump19/SLS2040.vso /Fcshaderdump19/SLS2040.vso.dis
//
//
// Parameters:
//
float4 DecalFade[8] : register(c31);
row_major float4x4 DecalProjection[8] : register(c40);
row_major float4x4 ModelViewProj : register(c0);
//
//
// Registers:
//
//   Name            Reg   Size
//   --------------- ----- ----
//   ModelViewProj[0]   const_0        1
//   ModelViewProj[1]   const_1        1
//   ModelViewProj[2]   const_2        1
//   ModelViewProj[3]   const_3        1
//   DecalFade[0]       const_31       1
//   DecalFade[1]       const_32       1
//   DecalFade[2]       const_33       1
//   DecalFade[3]       const_34       1
//   DecalFade[4]       const_35       1
//   DecalFade[5]       const_36       1
//   DecalFade[6]       const_37       1
//   DecalFade[7]       const_38       1
//   DecalProjection[0][0] const_40         1
//   DecalProjection[0][1] const_41         1
//   DecalProjection[0][2] const_42         1
//   DecalProjection[0][3] const_43         1
//   DecalProjection[1][0] const_44         1
//   DecalProjection[1][1] const_45         1
//   DecalProjection[1][2] const_46         1
//   DecalProjection[1][3] const_47         1
//   DecalProjection[2][0] const_48        1
//   DecalProjection[2][1] const_49        1
//   DecalProjection[2][2] const_50        1
//   DecalProjection[2][3] const_51        1
//   DecalProjection[3][0] const_52        1
//   DecalProjection[3][1] const_53        1
//   DecalProjection[3][2] const_54        1
//   DecalProjection[3][3] const_55        1
//   DecalProjection[4][0] const_56       1
//   DecalProjection[4][1] const_57       1
//   DecalProjection[4][2] const_58       1
//   DecalProjection[4][3] const_59       1
//   DecalProjection[5][0] const_60      1
//   DecalProjection[5][1] const_61      1
//   DecalProjection[5][2] const_62      1
//   DecalProjection[5][3] const_63      1
//   DecalProjection[6][0] const_64      1
//   DecalProjection[6][1] const_65      1
//   DecalProjection[6][2] const_66      1
//   DecalProjection[6][3] const_67      1
//   DecalProjection[7][0] const_68      1
//   DecalProjection[7][1] const_69      1
//   DecalProjection[7][2] const_70      1
//   DecalProjection[7][3] const_71      1
//


// Structures:

struct VS_INPUT {
    float4 position : POSITION;
    float3 normal : NORMAL;
};

struct VS_OUTPUT {
    float4 position : POSITION;
    float3 texcoord_0 : TEXCOORD0;
    float3 texcoord_1 : TEXCOORD1;
    float3 texcoord_2 : TEXCOORD2;
    float3 texcoord_3 : TEXCOORD3;
    float3 texcoord_4 : TEXCOORD4;
    float3 texcoord_5 : TEXCOORD5;
    float3 texcoord_6 : TEXCOORD6;
    float3 texcoord_7 : TEXCOORD7;
};

// Code:

VS_OUTPUT main(VS_INPUT IN) {
    VS_OUTPUT OUT;

#define	shade(n, l)		max(dot(n, l), 0)
#define	shades(n, l)		saturate(dot(n, l))

    float2 m102;
    float2 m105;
    float2 m108;
    float2 m111;
    float2 m114;
    float2 m85;
    float2 m96;
    float2 m99;
    float1 q0;
    float1 q1;
    float3 q15;
    float1 q2;
    float1 q3;
    float3 q35;
    float3 q36;
    float1 q4;
    float3 q45;
    float3 q46;
    float3 q47;
    float3 q48;
    float3 q49;
    float1 q5;
    float3 q50;
    float3 q51;
    float3 q52;
    float3 q53;
    float3 q54;
    float3 q55;
    float3 q56;
    float3 q57;
    float1 q6;
    float1 q7;

    q7.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[7][2].xyz)), 10) * DecalFade[7].x;
    q6.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[6][2].xyz)), 10) * DecalFade[6].x;
    q5.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[5][2].xyz)), 10) * DecalFade[5].x;
    q4.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[4][2].xyz)), 10) * DecalFade[4].x;
    q2.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[2][2].xyz)), 10) * DecalFade[2].x;
    q1.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[1][2].xyz)), 10) * DecalFade[1].x;
    q0.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[0][2].xyz)), 10) * DecalFade[0].x;
    OUT.position.xyzw = mul(ModelViewProj, IN.position.xyzw);
    q57.xyz = float3(DecalProjection[7][0].w, DecalProjection[7][1].w, DecalProjection[7][2].w);
    q15.xyz = q57.xyz + IN.position.xyz;
    m114.xy = mul(float2x3(DecalProjection[7][0].xyz, DecalProjection[7][1].xyz), q15.xyz);
    q55.xyz = float3(DecalProjection[6][0].w, DecalProjection[6][1].w, DecalProjection[6][2].w);
    q56.xyz = q55.xyz + IN.position.xyz;
    m111.xy = mul(float2x3(DecalProjection[6][0].xyz, DecalProjection[6][1].xyz), q56.xyz);
    q53.xyz = float3(DecalProjection[5][0].w, DecalProjection[5][1].w, DecalProjection[5][2].w);
    q54.xyz = q53.xyz + IN.position.xyz;
    m108.xy = mul(float2x3(DecalProjection[5][0].xyz, DecalProjection[5][1].xyz), q54.xyz);
    q51.xyz = float3(DecalProjection[4][0].w, DecalProjection[4][1].w, DecalProjection[4][2].w);
    q52.xyz = q51.xyz + IN.position.xyz;
    m105.xy = mul(float2x3(DecalProjection[4][0].xyz, DecalProjection[4][1].xyz), q52.xyz);
    q49.xyz = float3(DecalProjection[3][0].w, DecalProjection[3][1].w, DecalProjection[3][2].w);
    q50.xyz = q49.xyz + IN.position.xyz;
    m102.xy = mul(float2x3(DecalProjection[3][0].xyz, DecalProjection[3][1].xyz), q50.xyz);
    q47.xyz = float3(DecalProjection[2][0].w, DecalProjection[2][1].w, DecalProjection[2][2].w);
    q48.xyz = q47.xyz + IN.position.xyz;
    m99.xy = mul(float2x3(DecalProjection[2][0].xyz, DecalProjection[2][1].xyz), q48.xyz);
    q45.xyz = float3(DecalProjection[1][0].w, DecalProjection[1][1].w, DecalProjection[1][2].w);
    q46.xyz = q45.xyz + IN.position.xyz;
    m96.xy = mul(float2x3(DecalProjection[1][0].xyz, DecalProjection[1][1].xyz), q46.xyz);
    q35.xyz = float3(DecalProjection[0][0].w, DecalProjection[0][1].w, DecalProjection[0][2].w);
    q36.xyz = q35.xyz + IN.position.xyz;
    m85.xy = mul(float2x3(DecalProjection[0][0].xyz, DecalProjection[0][1].xyz), q36.xyz);
    q3.x = pow(abs(1 - shade(IN.normal.xyz, DecalProjection[3][2].xyz)), 10) * DecalFade[3].x;
    OUT.texcoord_0.xy = (0.0125000002 * m85.xy) + 0.5;
    OUT.texcoord_0.z = (1 - (abs(dot(DecalProjection[0][2].xyz, q36.xyz)) / 256)) * q0.x;
    OUT.texcoord_1.xy = (0.0125000002 * m96.xy) + 0.5;
    OUT.texcoord_1.z = (1 - (abs(dot(DecalProjection[1][2].xyz, q46.xyz)) / 256)) * q1.x;
    OUT.texcoord_2.xy = (0.0125000002 * m99.xy) + 0.5;
    OUT.texcoord_2.z = (1 - (abs(dot(DecalProjection[2][2].xyz, q48.xyz)) / 256)) * q2.x;
    OUT.texcoord_3.xy = (0.0125000002 * m102.xy) + 0.5;
    OUT.texcoord_3.z = (1 - (abs(dot(DecalProjection[3][2].xyz, q50.xyz)) / 256)) * q3.x;
    OUT.texcoord_4.xy = (0.0125000002 * m105.xy) + 0.5;
    OUT.texcoord_4.z = (1 - (abs(dot(DecalProjection[4][2].xyz, q52.xyz)) / 256)) * q4.x;
    OUT.texcoord_5.xy = (0.0125000002 * m108.xy) + 0.5;
    OUT.texcoord_5.z = (1 - (abs(dot(DecalProjection[5][2].xyz, q54.xyz)) / 256)) * q5.x;
    OUT.texcoord_6.xy = (0.0125000002 * m111.xy) + 0.5;
    OUT.texcoord_6.z = (1 - (abs(dot(DecalProjection[6][2].xyz, q56.xyz)) / 256)) * q6.x;
    OUT.texcoord_7.xy = (0.0125000002 * m114.xy) + 0.5;
    OUT.texcoord_7.z = (1 - (abs(dot(DecalProjection[7][2].xyz, q15.xyz)) / 256)) * q7.x;

    return OUT;
};

// approximately 148 instruction slots used
