//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float depthFogAmount;
//   float4 depthFogColor;
//   float depthFogFarDistance;
//   float depthFogNearDistance;
//   float depthTintAmount;
//   float4 depthTintColor;
//   float depthTintFarDistance;
//   float depthTintNearDistance;
//   float distortionBufferScale;
//   float distortionStrength;
//   float4 fogColor;
//   
//   struct
//   {
//       float4 worldVector;
//       float4 color;
//       float4 channelMask;
//
//   } lights;
//   
//   sampler2D mtbSampleSlot1;
//   sampler2D mtbSampleSlot2;
//   sampler2D mtbSampleSlot3;
//   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
//   depthTintColor        c14      1
//   depthTintNearDistance c15      1
//   depthTintFarDistance  c16      1
//   depthTintAmount       c17      1
//   depthFogColor         c18      1
//   depthFogNearDistance  c19      1
//   depthFogFarDistance   c20      1
//   depthFogAmount        c21      1
//   worldEyePos           c22      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
//   s_shadowMask          s6       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 };
//
//   depthTintColor
//     c14  = { 0, 0, 0, 0 };
//
//   depthTintNearDistance
//     c15  = { 0, 0, 0, 0 };
//
//   depthTintFarDistance
//     c16  = { 0, 0, 0, 0 };
//
//   depthTintAmount
//     c17  = { 0, 0, 0, 0 };
//
//   depthFogColor
//     c18  = { 0, 0, 0, 0 };
//
//   depthFogNearDistance
//     c19  = { 0, 0, 0, 0 };
//
//   depthFogFarDistance
//     c20  = { 0, 0, 0, 0 };
//
//   depthFogAmount
//     c21  = { 0, 0, 0, 0 };
//
//   worldEyePos
//     c22  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

    ps_3_0
    def c23, 0.00100000005, 1, 1.00000001e-007, 10
    def c24, 2, -1, 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
    texld_pp r0, v1.zwzw, s4
    mad_pp r0.xy, r0.wyzw, c24.x, c24.y
    add_pp r0.zw, -r0.xyxy, c23.x
    mad_pp r0.xy, c11.x, r0.zwzw, r0
    mov r0.zw, c23
    mul_pp r0.w, r0.w, c12.x
    mul_pp r1.xy, r0, r0.w
    mov r1.zw, c24.z
    add r2, -r1, v2
    texldp r2, r2, s2
    add_sat r0.x, r2.w, -v2.w
    mad r1, r0.x, -r1, v2
    mul r0.x, r1.w, c9.x
    min r2.xy, r0.x, r1
    mov r2.zw, r1
    texldp_pp r1, r2, s0
    texldp_pp r3, r2, s1
    texldp_pp r2, r2, s2
    mad_pp r0.xyw, r1.xyzz, r3.w, r3.xyzz
    mad_pp r1.xyz, v2.z, c7, -r0.xyww
    texld_pp r3, v1, s3
    mad_pp r0.xyw, r3.x, r1.xyzz, r0
    mad r1.xyz, r0.xyww, c14, -r0.xyww
    add r1.w, r2.w, -c15.x
    add r2.x, r2.w, -c19.x
    rcp r2.y, c16.x
    mul_sat_pp r1.w, r1.w, r2.y
    mul r1.w, r1.w, c17.x
    mad_pp r0.xyw, r1.w, r1.xyzz, r0
    rcp r1.x, c20.x
    mul_sat_pp r1.x, r2.x, r1.x
    mul r1.x, r1.x, c21.x
    lrp_pp r2.xyz, r1.x, c18, r0.xyww
    mul r0.xyw, c1.xyzz, v2.y
    mad r0.xyw, v9.x, c0.xyzz, r0
    mad r0.xyw, v2.w, c2.xyzz, r0
    add r0.xyw, r0, c3.xyzz
    add r1.xyz, -r0.xyww, c22
    mad r0.xyw, r0, -c4.w, c4.xyzz
    nrm_pp r3.xyz, r1
    dp3 r1.x, r0.xyww, r0.xyww
    rsq r1.x, r1.x
    mad_pp r0.xyw, r0, r1.x, r3.xyzz
    nrm_pp r1.xyz, r0.xyww
    mul_pp r0.xyw, c23.x, v4.xyzz
    mad_pp r0.xyw, v3.xyzz, c23.x, r0
    add_pp r0.xyw, r0, v5.xyzz
    nrm_pp r3.xyz, r0.xyww
    nrm_pp r4.xyz, r3
    dp3_sat_pp r0.x, r4, r1
    add_pp r0.y, r0.z, c10.x
    pow_pp r1.x, r0.x, r0.y
    texldp_pp r0, v2, s6
    dp4_sat_pp r0.x, r0, c6
    add_pp r0.x, -r0.x, c23.y
    mul_sat_pp r0.x, r0.x, v4.w
    mul_pp r0.xyz, r0.x, c5
    mul_pp r0.xyz, r1.x, r0
    texld_pp r1, v0, s5
    mul_pp r1.xyz, r1, c13
    mad_pp oC0.xyz, r1, r0, 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 74 instruction slots used (8 texture, 66 arithmetic)
 

