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

row_major float4x4 ModelViewProj : register(c0);
float3 LightDirection[3] : register(c13);
float4 FogParam : register(c23);
float3 FogColor : register(c24);
row_major float4x4 TESR_InvViewProjectionTransform : register(c34);

// Registers:
//
//   Name           Reg   Size
//   -------------- ----- ----
//   ModelViewProj[0]  const_0        1
//   ModelViewProj[1]  const_1        1
//   ModelViewProj[2]  const_2        1
//   ModelViewProj[3]  const_3        1
//   LightDirection[0] const_13       1
//   FogParam       const_23      1
//   FogColor       const_24      1
//


// Structures:

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

struct VS_OUTPUT {
    float4 color_0 : COLOR0;
    float4 color_1 : COLOR1;
    float4 position : POSITION;
    float2 texcoord_0 : TEXCOORD0;
    float3 texcoord_1 : TEXCOORD1;
	float4 texcoord_7 : TEXCOORD7;
};

// Code:

VS_OUTPUT main(VS_INPUT IN) {
	
    VS_OUTPUT OUT;

    float3 q0;
    float4 r0;
	float4 r1;
	
	r0 = mul(ModelViewProj, IN.LPOSITION);
	r1 = mul(r0, TESR_InvViewProjectionTransform);
	
    q0.xyz = mul(float3x3(IN.LTANGENT.xyz, IN.LBINORMAL.xyz, IN.LNORMAL.xyz), LightDirection[0].xyz);
    OUT.color_0.rgba = IN.LCOLOR_0.xyzw;
    OUT.color_1.a = 1 - saturate((FogParam.x - length(r0.xyz)) / FogParam.y);
    OUT.color_1.rgb = FogColor.rgb;
    OUT.position = r0;
    OUT.texcoord_0.xy = IN.LTEXCOORD_0.xy;
    OUT.texcoord_1.xyz = normalize(q0.xyz);
	OUT.texcoord_7 = r1;
    return OUT;
	
};

// approximately 24 instruction slots used
