//Specular VS 8.
//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float PlayerDistortionScale;
//   float WorldDistortionScale;
//   float4 gCameraPos;
//   float4 gDistort1PhaseFreq;
//   float4 gDistort1SizeOffset;
//   float4 gDistort2PhaseFreq;
//   float4 gDistort2SizeOffset;
//   float gFogDensity;
//   float gFogEnd;
//   float gFogStart;
//   int gFogType;
//   row_major float4x4 gLocalToWorld;
//   float4 gPlayerPosRadius;
//   float4 gPlayerSpeedSize;
//   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
//   PlayerDistortionScale c230     1
//   gPlayerPosRadius      c231     1
//   gPlayerSpeedSize      c232     1
//   WorldDistortionScale  c233     1
//   gDistort1PhaseFreq    c234     1
//   gDistort2PhaseFreq    c235     1
//   gDistort1SizeOffset   c236     1
//   gDistort2SizeOffset   c237     1
//

    vs_3_0
   def c238, 0, 1, 0.0625, 0.5
dcl_2d s3
    def c0, 1, 0, 1.44269502, 0.300000012
    def c1, -1, -2, -3, 0.5
    def c2, 0.159154937, 0.5, 6.28318548, -3.14159274
    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, c238.z, s3
    mov r0.x, c210.x
    add r0.x, r0.x, -c209.x
    rcp r0.x, r0.x
    mov r1, c1
    add r0.yzw, r1.xxyz, c223.x
    sge r0.yzw, -r0_abs, r0_abs
    abs r1.x, c223.x
    sge r1.x, -r1.x, r1.x
    mad r2, v0.xyzx, c0.xxxy, c0.yyyx
    dp4 r3.x, c192, r2
    dp4 r3.y, c193, r2
    dp4 r3.z, c194, r2
    dp4 r2.w, c195, r2
    add r4.xyz, -r3, c208
    dp3 r1.y, r4, r4
    rsq r1.y, r1.y
    rcp r1.y, r1.y
    mul r1.z, r1.y, c211.x
    add r1.y, -r1.y, c210.x
    mul r3.w, r1.z, c0.z
    mul r1.z, r1.z, r1.z
    exp r3.w, r3.w
    rcp r3.w, r3.w
    mad r0.y, r3.w, r0.y, r1.x
    mul r1.x, r1.z, c0.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, r1.y
    mad r0.y, r0.z, r0.w, r0.y
    mad_sat o3.x, c209.x, r0.x, r0.y
    dp3 r0.x, c236, c236
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    dp3 r0.y, c237, c237
    rsq r0.y, r0.y
    rcp r0.y, r0.y
    add r1.xyz, r3, c235
    dp3 r0.z, r1, c235.w
    mad r0.z, r0.z, c2.x, c2.y
    frc r0.z, r0.z
    mad r0.z, r0.z, c2.z, c2.w
    sincos r5.y, r0.z
    add r0.z, r5.y, c237.w
    mul r0.y, r0.y, r0.z
    add r1.xyz, r3, c234
    dp3 r0.z, r1, c234.w
    mad r0.z, r0.z, c2.x, c2.y
    frc r0.z, r0.z
    mad r0.z, r0.z, c2.z, c2.w
    sincos r5.y, r0.z
    add r0.z, r5.y, c236.w
    mad r0.x, r0.z, r0.x, r0.y
    mad r0.x, r0.x, c2.x, c2.y
    frc r0.x, r0.x
    mad r0.x, r0.x, c2.z, c2.w
    sincos r5.xy, r0.x
    add r0.x, r5.x, c1.x
    mul r0.yw, r5.y, c236.xxzz
    mul r0.z, r0.x, c236.y
    mul r0.x, c233.x, v1.x
    mul r0.yz, r0, r0.x
    add r0.y, r0.z, r0.y
    mad r0.x, r0.w, r0.x, r0.y
    dp3 r0.y, c192, v2
    dp3 r0.z, c193, v2
    dp3 r0.w, c194, v2
    mul r0.xyz, r0.x, r0.yzww
    add r5.xyz, r3, -c231
    mul r5.w, r5.y, c0.w
    mul r1.xyz, r5, c0.xwxw
    dp3 r0.w, r5.xwzw, r1
    rsq r0.w, r0.w
    rcp r3.w, r0.w
    mul r1.xyz, r1, r0.w
    mad r0.w, c231.w, -r1.w, r3.w
    max r0.w, r0.w, c0.y
    rcp r1.w, c231.w
    mul r0.w, r0.w, r1.w
    min r0.w, r0.w, c0.x
    add r0.w, -r0.w, c0.x
    mul r1.xyz, r1, r0.w
    mul r1.xyz, r1, c232.w
    mad r0.xyz, r1, c230.x, r0
    add r2.xyz, r3, r0
    mov o6.xyz, r3
    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, c0.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 r4.x, r22.x, r21.x, r4.x
mad r4.y, r22.x, r21.y, r4.y
mad r4.z, r22.x, r21.z, r4.z
    mov o7.xyz, r4
    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, r4
    mul r3.xyz, r0.x, -v8
    dp3 r0.x, c200, r4
    dp3 r0.w, c202, r4
    mad r3.xyz, v7, r0.x, r3
    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 148 instruction slots used
