//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.08.299.0000
//
//   vsa shaderdump19/SM3004.vso /Fcshaderdump19/SM3004.vso.dis
//
//
// Parameters:

float4 FogColor : register(c16);
float4 FogParam : register(c15);
row_major float4x4 ModelViewProj : register(c0);
row_major float4x4 ShadowProj : register(c21);
float4 ShadowProjData : register(c25);
float4 ShadowProjTransform : register(c26);
row_major float4x4 TESR_ShadowCameraToLightTransform : register(c85);

// Registers:
//
//   Name                Reg   Size
//   ------------------- ----- ----
//   ModelViewProj[0]       const_0        1
//   ModelViewProj[1]       const_1        1
//   ModelViewProj[2]       const_2        1
//   ModelViewProj[3]       const_3        1
//   FogParam            const_15      1
//   FogColor            const_16      1
//   ShadowProj[0]          const_21       1
//   ShadowProj[1]          const_22       1
//   ShadowProj[2]          const_23       1
//   ShadowProj[3]          const_24       1
//   ShadowProjData      const_25      1
//   ShadowProjTransform const_26      1
//


// Structures:

struct VS_INPUT {
    float4 LPOSITION : POSITION;
    float3 LTANGENT : TANGENT;
    float3 LBINORMAL : BINORMAL;
    float3 LNORMAL : NORMAL;
    float4 LTEXCOORD_0 : TEXCOORD0;
};

struct VS_OUTPUT {
    float4 LPOSITION : POSITION;
    float2 LTEXCOORD_0 : TEXCOORD0;
    float4 LCOLOR_0 : COLOR0;
    float3 LTEXCOORD_3 : TEXCOORD3;
    float3 LTEXCOORD_4 : TEXCOORD4;
    float3 LTEXCOORD_5 : TEXCOORD5;
    float3 LTEXCOORD_6 : TEXCOORD6;
    float4 LTEXCOORD_1 : TEXCOORD1;
    float4 LTEXCOORD_7 : TEXCOORD7;
};

// Code:

VS_OUTPUT main(VS_INPUT IN) {
    VS_OUTPUT OUT;

    float1 q0;
    float4 r0;
    float4 r2;

    r0 = mul(ModelViewProj, IN.LPOSITION.xyzw);
	r2 = mul(r0, TESR_ShadowCameraToLightTransform);
    OUT.LPOSITION = r0;
    OUT.LTEXCOORD_0.xy = IN.LTEXCOORD_0.xy;
    q0.x = 1 - saturate((FogParam.x - length(r0.xyz)) / FogParam.y);
    OUT.LCOLOR_0.xyzw = 1;
    OUT.LTEXCOORD_1 = r2;
    OUT.LTEXCOORD_3.xyz = IN.LTANGENT.xyz;
    OUT.LTEXCOORD_4.xyz = IN.LBINORMAL.xyz;
    OUT.LTEXCOORD_5.xyz = IN.LNORMAL.xyz;
    OUT.LTEXCOORD_6.xyz = IN.LPOSITION.xyz;
    OUT.LTEXCOORD_7.w = q0.x * FogParam.z;
    OUT.LTEXCOORD_7.xyz = FogColor.rgb;

    return OUT;
};

// approximately 31 instruction slots used
