//
// 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;
//   float globalOpacity;
//   
//   struct
//   {
//       float4 worldVector;
//       float4 color;
//       float4 channelMask;
//
//   } lights;
//   
//   sampler2D mtbSampleSlot1;
//   sampler2D mtbSampleSlot2;
//   sampler2D mtbSampleSlot3;
//   float normalMapBias;
//   float4 nvidiaHack;
//   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
//   globalOpacity         c9       1
//   distortionBufferScale c10      1
//   specularPower         c11      1
//   normalMapBias         c12      1
//   distortionStrength    c13      1
//   specularColor         c14      1
//   diffuseColor          c15      1
//   depthTintColor        c16      1
//   depthTintNearDistance c17      1
//   depthTintFarDistance  c18      1
//   depthTintAmount       c19      1
//   depthFogColor         c20      1
//   depthFogNearDistance  c21      1
//   depthFogFarDistance   c22      1
//   depthFogAmount        c23      1
//   Ambient               c24      1
//   worldEyePos           c25      1
//   nvidiaHack            c31      1
//   s_sceneDepth          s0       1
//   mtbSampleSlot1        s1       1
//   mtbSampleSlot2        s2       1
//   mtbSampleSlot3        s3       1
//   s_luminanceMap1       s4       1
//   s_shadowMask          s5       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 };
//
//   globalOpacity
//     c9   = { 0, 0, 0, 0 };
//
//   distortionBufferScale
//     c10  = { 0, 0, 0, 0 };
//
//   specularPower
//     c11  = { 0, 0, 0, 0 };
//
//   normalMapBias
//     c12  = { 0, 0, 0, 0 };
//
//   distortionStrength
//     c13  = { 0, 0, 0, 0 };
//
//   specularColor
//     c14  = { 0, 0, 0, 0 };
//
//   diffuseColor
//     c15  = { 0, 0, 0, 0 };
//
//   depthTintColor
//     c16  = { 0, 0, 0, 0 };
//
//   depthTintNearDistance
//     c17  = { 0, 0, 0, 0 };
//
//   depthTintFarDistance
//     c18  = { 0, 0, 0, 0 };
//
//   depthTintAmount
//     c19  = { 0, 0, 0, 0 };
//
//   depthFogColor
//     c20  = { 0, 0, 0, 0 };
//
//   depthFogNearDistance
//     c21  = { 0, 0, 0, 0 };
//
//   depthFogFarDistance
//     c22  = { 0, 0, 0, 0 };
//
//   depthFogAmount
//     c23  = { 0, 0, 0, 0 };
//
//   Ambient
//     c24  = { 0, 0, 0, 0 };
//
//   worldEyePos
//     c25  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

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

// approximately 89 instruction slots used (7 texture, 82 arithmetic)
 

