//Specular VS 5.
//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float PlayerDistortScale;
//   float3 User_Vector;
//   float4 gCameraPos;
//   float gFogDensity;
//   float gFogEnd;
//   float gFogStart;
//   int gFogType;
//   row_major float4x4 gLocalToWorld;
//   float4 gPlayerPosRadius;
//   float4 gPlayerSpeedSize;
//   float4 gPushPosRadius;
//   float4 gPushSpeedSize;
//   float4 gPushVertFlatnessAndSize;
//   row_major float4x4 gWorldToLocal;
//   row_major float4x4 gWorldToProjection;
//
//
// Registers:
//
//   Name                     Reg   Size
//   ------------------------ ----- ----
//   gLocalToWorld            c192     4
//   gWorldToLocal            c200     3
//   gWorldToProjection       c204     4
//   gCameraPos               c208     1
//   gFogStart                c209     1
//   gFogEnd                  c210     1
//   gFogDensity              c211     1
//   gFogType                 c223     1
//   PlayerDistortScale       c230     1
//   gPlayerPosRadius         c231     1
//   gPlayerSpeedSize         c232     1
//   gPushPosRadius           c233     1
//   gPushSpeedSize           c234     1
//   gPushVertFlatnessAndSize c235     1
//   User_Vector              c236     1
//

    vs_3_0
   def c237, 0, 1, 0.0625, 0.5
dcl_2d s3
    def c0, -1, -2, -3, 0.5
    def c1, 1, 0, 1.44269502, 0.300000012
    def c2, 0.00100000005, 0, 0, 0
    dcl_position v0
    dcl_color v1
    dcl_normal v2
    dcl_texcoord v3
    dcl_texcoord1 v4
    dcl_texcoord2 v5
    dcl_texcoord3 v6
    dcl_tangent v7
    dcl_binormal v8
    dcl_position o0
    dcl_texcoord7 o1
    dcl_color1 o2
    dcl_fog o3.x
    dcl_texcoord o4
    dcl_texcoord1 o5
    dcl_texcoord2 o6
    dcl_texcoord3 o7
    dcl_texcoord4 o8
    dcl_texcoord5 o9
    dcl_texcoord6 o10
texldl r22, c237.z, s3
    mov r0.x, c210.x
    add r0.x, r0.x, -c209.x
    rcp r0.x, r0.x
    mov r1.x, c223.x
    add r0.yzw, r1.x, c0.xxyz
    sge r0.yzw, -r0_abs, r0_abs
    abs r1.x, c223.x
    sge r1.x, -r1.x, r1.x
    mad r2, v0.xyzx, c1.xxxy, c1.yyyx
    dp4 r1.y, c192, r2
    dp4 r1.z, c193, r2
    dp4 r1.w, c194, r2
    dp4 r2.w, c195, r2
    add r3.xyz, -r1.yzww, c208
    dp3 r3.w, r3, r3
    rsq r3.w, r3.w
    rcp r3.w, r3.w
    mul r4.x, r3.w, c211.x
    add r3.w, -r3.w, c210.x
    mul r4.y, r4.x, c1.z
    mul r4.x, r4.x, r4.x
    exp r4.y, r4.y
    rcp r4.y, r4.y
    mad r0.y, r4.y, r0.y, r1.x
    mul r1.x, r4.x, c1.z
    exp r1.x, r1.x
    rcp r1.x, r1.x
    mad r0.y, r1.x, r0.z, r0.y
    mul r0.z, r0.x, r3.w
    mad r0.y, r0.z, r0.w, r0.y
    mad_sat o3.x, c209.x, r0.x, r0.y
    dp3 r0.x, c234, c234
    rsq r0.x, r0.x
    rcp r0.y, r0.x
    mul r0.xzw, r0.x, c234.xyyz
    add r4.xyz, r1.yzww, -c233
    dp3 r1.x, r4, r0.xzww
    max r1.x, -r0.y, r1.x
    min r0.y, r0.y, r1.x
    mad r4.xyz, r0.xzww, r0.y, c233
    add r4.xyz, r1.yzww, -r4
    mul r4.w, r4.y, c235.x
    dp3 r0.y, r4.xzww, r4.xzww
    rsq r0.y, r0.y
    rcp r0.y, r0.y
    rcp r1.x, c233.w
    mul r0.y, r0.y, r1.x
    min r0.y, r0.y, c1.x
    add r0.y, -r0.y, c1.x
    mul r0.y, r0.y, c234.w
    mul r4.xyz, r0.xzww, r0.y
    mul r0.x, r0.y, c235.w
    mad r0.x, r0.x, -c235.y, r4.y
    add r0.y, c2.x, -v0.y
    max r4.w, r0.x, r0.y
    add r0.xyz, r1.yzww, -c231
    mul r0.w, r0.y, c1.w
    mul r5.xyz, r0, c1.xwxw
    dp3 r0.x, r0.xwzw, r5
    rsq r0.x, r0.x
    rcp r0.y, r0.x
    mul r0.xzw, r5.xyyz, r0.x
    mov r3.w, c231.w
    mad r0.y, r3.w, -c0.w, r0.y
    max r0.y, r0.y, c1.y
    rcp r1.x, c231.w
    mul r0.y, r0.y, r1.x
    min r0.y, r0.y, c1.x
    add r0.y, -r0.y, c1.x
    mul r0.xyz, r0.xzww, r0.y
    mul r0.xyz, r0, c232.w
    mad r0.xyz, c230.x, r0, r4.xwzw
    mul r0.xyz, r0, v0.y
    mad r2.xyz, r0, c236, r1.yzww
    mov o6.xyz, r1.yzww
    dp4 r0.x, c204, r2
    dp4 r0.y, c205, r2
    dp4 r0.z, c206, r2
    dp4 r0.w, c207, r2
    mov o6.w, r2.w
    mov o0, r0
    
    add r22.w, r0.w, -r22.y
    mad r0.x, r22.x, r22.w, r0.x
    mov o1, r0
    mov o2, v1
    mov o4.xy, v3
    mov o4.zw, v4.xyxy
    mov o5.xy, v5
    mov o5.zw, v6.xyxy
    mov o7.w, c1.y
mul r21.x, r22.y, c204.x
mul r21.y, r22.y, c204.y
mul r21.z, r22.y, c204.z
mov r21.w, c0.w
mul r20.x, c204.x, c204.x
mad r20.x, c204.y, c204.y, r20.x
mad r20.x, c204.z, c204.z, r20.x
rcp r20.x, r20.x
mul r21, r21, r20.x
mad r3.x, r22.x, r21.x, r3.x
mad r3.y, r22.x, r21.y, r3.y
mad r3.z, r22.x, r21.z, r3.z
    mov o7.xyz, r3
    mul r0.xyz, c201, v7.y
    mad r0.xyz, c200, v7.x, r0
    mad r0.xyz, c202, v7.z, r0
    mov o8.x, r0.x
    mul r1.xyz, c201, -v8.y
    mad r1.xyz, c200, -v8.x, r1
    mad r1.xyz, c202, -v8.z, r1
    mov o8.y, r1.x
    mul r2.xyz, c201, v2.y
    mad r2.xyz, c200, v2.x, r2
    mad r2.xyz, c202, v2.z, r2
    mov o8.z, r2.x
    dp3 r0.x, c201, r3
    mul r4.xyz, r0.x, -v8
    dp3 r0.x, c200, r3
    dp3 r0.w, c202, r3
    mad r3.xyz, v7, r0.x, r4
    mad r3.xyz, v2, r0.w, r3
    mov o8.w, r3.x
    mov o9.x, r0.y
    mov o10.x, r0.z
    mov o9.y, r1.y
    mov o10.y, r1.z
    mov o9.z, r2.y
    mov o10.z, r2.z
    mov o9.w, r3.y
    mov o10.w, r3.z

// approximately 116 instruction slots used
