//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float4 Ambient;
//   float depthFogAmount;
//   float4 depthFogColor;
//   float depthFogFarDistance;
//   float depthFogNearDistance;
//   float depthTintAmount;
//   float4 depthTintColor;
//   float depthTintFarDistance;
//   float depthTintNearDistance;
//   float3 diffuseColor;
//   float distortionBufferScale;
//   float distortionStrength;
//   float4 fogColor;
//   
//   struct
//   {
//       float4 worldVector;
//       float4 color;
//       float4 channelMask;
//
//   } lights;
//   
//   sampler2D mtbSampleSlot1;
//   sampler2D mtbSampleSlot2;
//   sampler2D mtbSampleSlot3;
//   sampler2D mtbSampleSlot4;
//   float normalMapBias;
//   float4 nvidiaHack;
//   sampler2D s_distortion;
//   sampler2D s_distortion2;
//   sampler2D s_sceneDepth;
//   sampler2D s_shadowMask;
//   float sceneDepthAlphaMask;
//   row_major float4x4 screenToWorld;
//   float3 specularColor;
//   float specularPower;
//   float3 worldEyePos;
//
//
// Registers:
//
//   Name                  Reg   Size
//   --------------------- ----- ----
//   screenToWorld         c0       4
//   lights                c4       3
//   fogColor              c7       1
//   sceneDepthAlphaMask   c8       1
//   distortionBufferScale c9       1
//   specularPower         c10      1
//   normalMapBias         c11      1
//   distortionStrength    c12      1
//   specularColor         c13      1
//   diffuseColor          c14      1
//   depthTintColor        c15      1
//   depthTintNearDistance c16      1
//   depthTintFarDistance  c17      1
//   depthTintAmount       c18      1
//   depthFogColor         c19      1
//   depthFogNearDistance  c20      1
//   depthFogFarDistance   c21      1
//   depthFogAmount        c22      1
//   Ambient               c23      1
//   worldEyePos           c24      1
//   nvidiaHack            c31      1
//   s_distortion          s0       1
//   s_distortion2         s1       1
//   s_sceneDepth          s2       1
//   mtbSampleSlot1        s3       1
//   mtbSampleSlot2        s4       1
//   mtbSampleSlot3        s5       1
//   mtbSampleSlot4        s6       1
//   s_shadowMask          s7       1
//
//
// Default values:
//
//   screenToWorld
//     c0   = { 0, 0, 0, 0 };
//     c1   = { 0, 0, 0, 0 };
//     c2   = { 0, 0, 0, 0 };
//     c3   = { 0, 0, 0, 0 };
//
//   lights
//     c4   = { 0, 0, 0, 0 };
//     c5   = { 0, 0, 0, 0 };
//     c6   = { 0, 0, 0, 0 };
//
//   fogColor
//     c7   = { 0, 0, 0, 0 };
//
//   sceneDepthAlphaMask
//     c8   = { 0, 0, 0, 0 };
//
//   distortionBufferScale
//     c9   = { 0, 0, 0, 0 };
//
//   specularPower
//     c10  = { 0, 0, 0, 0 };
//
//   normalMapBias
//     c11  = { 0, 0, 0, 0 };
//
//   distortionStrength
//     c12  = { 0, 0, 0, 0 };
//
//   specularColor
//     c13  = { 0, 0, 0, 0 };
//
//   diffuseColor
//     c14  = { 0, 0, 0, 0 };
//
//   depthTintColor
//     c15  = { 0, 0, 0, 0 };
//
//   depthTintNearDistance
//     c16  = { 0, 0, 0, 0 };
//
//   depthTintFarDistance
//     c17  = { 0, 0, 0, 0 };
//
//   depthTintAmount
//     c18  = { 0, 0, 0, 0 };
//
//   depthFogColor
//     c19  = { 0, 0, 0, 0 };
//
//   depthFogNearDistance
//     c20  = { 0, 0, 0, 0 };
//
//   depthFogFarDistance
//     c21  = { 0, 0, 0, 0 };
//
//   depthFogAmount
//     c22  = { 0, 0, 0, 0 };
//
//   Ambient
//     c23  = { 0, 0, 0, 0 };
//
//   worldEyePos
//     c24  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

    ps_3_0
    def c25, 2, -1, 1, 1.00000001e-007
    def c26, 0.5, 10, 0, 0
  dcl_texcoord8 v9.x
    dcl_texcoord v0.xy
    dcl_texcoord1 v1
    dcl_texcoord6 v2
    dcl_texcoord3_pp v3.xyz
    dcl_texcoord4_pp v4
    dcl_texcoord5_pp v5.xyz
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    dcl_2d s3
    dcl_2d s4
    dcl_2d s5
    dcl_2d s6
    dcl_2d s7
    mul r0.xyz, c1, v2.y
    mad r0.xyz, v9.x, c0, r0
    mad r0.xyz, v2.w, c2, r0
    add r0.xyz, r0, c3
    add r1.xyz, -r0, c24
    mad r0.xyz, r0, -c4.w, c4
    dp3 r0.w, r1, r1
    rsq r0.w, r0.w
    nrm_pp r2.xyz, r0
    mad_pp r0.xyz, r1, r0.w, r2
    nrm_pp r1.xyz, r0
    texld_pp r0, v0, s4
    mad_pp r0.xyz, r0, c25.x, c25.y
    mul_pp r3.xyz, r0.y, v4
    mad_pp r3.xyz, r0.x, v3, r3
    mad_pp r3.xyz, r0.z, v5, r3
    nrm_pp r4.xyz, r3
    nrm_pp r3.xyz, r4
    dp3_sat_pp r0.w, r2, r4
    dp3_sat_pp r1.x, r3, r1
    mov r1.zw, c25
    add_pp r1.y, r1.w, c10.x
    pow_pp r2.x, r1.x, r1.y
    texldp_pp r3, v2, s7
    dp4_sat_pp r1.x, r3, c6
    add_pp r1.x, -r1.x, c25.z
    mul_sat_pp r1.x, r1.x, v4.w
    mul_pp r1.xyw, r1.x, c5.xyzz
    mul_pp r2.xyz, r2.x, r1.xyww
    mul_pp r1.xyw, r0.w, r1
    texld_pp r3, v0, s6
    mul_pp r3.xyz, r3, c13
    texld_pp r4, v0, s3
    mul_pp r4.xyz, r4, c14
    mul_pp r1.xyw, r1, r4.xyzz
    mad_pp r1.xyw, r3.xyzz, r2.xyzz, r1
    dp3 r0.z, v5, r0
    mad_sat_pp r0.z, r0.z, c26.x, c26.x
    mul_pp r0.z, r0.z, r0.z
    lrp_pp r2.x, r0.z, r1.z, c23.w
    mul_pp r2.xyz, r4, r2.x
    mul_pp r3.xyz, r2, c23
    mov_pp r4.xyz, c23
    mad_pp r2.xyz, r4, -r2, c7
    mad_pp r2.xyz, v2.z, r2, r3
    texld_pp r3, v1.zwzw, s5
    mad_pp r0.zw, r3.xywy, c25.x, c25.y
    lrp_pp r3.xy, c11.x, r0, r0.zwzw
    mov_pp r0.y, c26.y
    mul_pp r0.x, r0.y, c12.x
    mul_pp r0.xy, r3, r0.x
    mov r0.zw, c26.z
    add r3, -r0, v2
    texldp r3, r3, s2
    add_sat r1.z, r3.w, -v2.w
    mad r0, r1.z, -r0, v2
    mul r1.z, r0.w, c9.x
    min r3.xy, r1.z, r0
    mov r3.zw, r0
    texldp_pp r0, r3, s0
    texldp_pp r4, r3, s1
    texldp_pp r3, r3, s2
    mad_pp r0.xyz, r0, r4.w, r4
    texld_pp r4, v1, s3
    lrp_pp r3.xyz, r4.w, r2, r0
    mad r0.xyz, r3, c15, -r3
    add r0.w, r3.w, -c16.x
    add r1.z, r3.w, -c20.x
    rcp r2.x, c17.x
    mul_sat_pp r0.w, r0.w, r2.x
    mul r0.w, r0.w, c18.x
    mad_pp r0.xyz, r0.w, r0, r3
    rcp r0.w, c21.x
    mul_sat_pp r0.w, r1.z, r0.w
    mul r0.w, r0.w, c22.x
    lrp_pp r2.xyz, r0.w, c19, r0
    add_pp oC0.xyz, r1.xyww, r2
    add r0.x, -c31.x, v2.w
    mov_pp r1.x, c31.x
    mad_pp oC0.w, c8.x, r0.x, r1.x

// approximately 90 instruction slots used (10 texture, 80 arithmetic)
 

