//
// 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_luminanceMap1;
//   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_luminanceMap1       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 };
//
//   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, 2, -1, 1, 1.00000001e-007
    def c24, 10, 0, 0, 0
  dcl_texcoord8 v9.x
    dcl_texcoord v0.xy
    dcl_texcoord1 v1
    dcl_texcoord6 v2
    dcl_texcoord3_pp v3
    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, c22
    mad r0.xyz, r0, -c4.w, c4
    nrm_pp r2.xyz, r1
    dp3 r0.w, r0, r0
    rsq r0.w, r0.w
    mad_pp r0.xyz, r0, r0.w, r2
    nrm_pp r1.xyz, r0
    texld_pp r0, v0, s4
    mad_pp r0.xyz, r0.wyzw, c23.x, c23.y
    mul_pp r2.xyz, r0.y, v4
    mad_pp r2.xyz, r0.x, v3, r2
    mad_pp r2.xyz, r0.z, v5, r2
    nrm_pp r3.xyz, r2
    nrm_pp r2.xyz, r3
    dp3_sat_pp r0.z, r2, r1
    mov r0.w, c23.w
    add_pp r0.w, r0.w, c10.x
    pow_pp r1.x, r0.z, r0.w
    mov_pp r0.z, v3.w
    mov_pp r0.w, v4.w
    texld_pp r2, r0.zwzw, s6
    texldp_pp r3, v2, s7
    dp4_sat_pp r0.z, r3, c6
    add_pp r0.z, -r0.z, c23.z
    mul_sat_pp r0.z, r2.y, r0.z
    mul_pp r1.yzw, r0.z, c5.xxyz
    mul_pp r1.xyz, r1.x, r1.yzww
    texld_pp r2, v1.zwzw, s4
    mad_pp r0.zw, r2.xywy, c23.x, c23.y
    lrp_pp r2.xy, c11.x, r0, r0.zwzw
    mov_pp r0.x, c24.x
    mul_pp r0.x, r0.x, c12.x
    mul_pp r0.xy, r2, r0.x
    mov r0.zw, c24.y
    add r2, -r0, v2
    texldp r2, r2, s2
    add_sat r1.w, r2.w, -v2.w
    mad r0, r1.w, -r0, v2
    mul r1.w, r0.w, c9.x
    min r2.xy, r1.w, r0
    mov r2.zw, r0
    texldp_pp r0, r2, s0
    texldp_pp r3, r2, s1
    texldp_pp r2, r2, s2
    mad_pp r0.xyz, r0, r3.w, r3
    mad_pp r2.xyz, v2.z, c7, -r0
    texld_pp r3, v1, s3
    mad_pp r0.xyz, r3.x, r2, r0
    mad r2.xyz, r0, c14, -r0
    add r0.w, r2.w, -c15.x
    add r1.w, r2.w, -c19.x
    rcp r2.w, c16.x
    mul_sat_pp r0.w, r0.w, r2.w
    mul r0.w, r0.w, c17.x
    mad_pp r0.xyz, r0.w, r2, r0
    rcp r0.w, c20.x
    mul_sat_pp r0.w, r1.w, r0.w
    mul r0.w, r0.w, c21.x
    lrp_pp r2.xyz, r0.w, c18, r0
    texld_pp r0, v0, s5
    mul_pp r0.xyz, r0, c13
    mad_pp oC0.xyz, r0, r1, 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 79 instruction slots used (10 texture, 69 arithmetic)
 

