//
// 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;
//   float normalMapBias;
//   float4 nvidiaHack;
//   sampler2D s_distortion;
//   sampler2D s_distortion2;
//   sampler2D s_sceneDepth;
//   sampler2D s_shadowMask;
//   float sceneDepthAlphaMask;
//   row_major float4x4 screenToWorld;
//
//
// Registers:
//
//   Name                  Reg   Size
//   --------------------- ----- ----
//   screenToWorld         c0       4
//   lights                c4       3
//   fogColor              c7       1
//   sceneDepthAlphaMask   c8       1
//   distortionBufferScale c9       1
//   normalMapBias         c10      1
//   distortionStrength    c11      1
//   diffuseColor          c12      1
//   depthTintColor        c13      1
//   depthTintNearDistance c14      1
//   depthTintFarDistance  c15      1
//   depthTintAmount       c16      1
//   depthFogColor         c17      1
//   depthFogNearDistance  c18      1
//   depthFogFarDistance   c19      1
//   depthFogAmount        c20      1
//   Ambient               c21      1
//   nvidiaHack            c31      1
//   s_distortion          s0       1
//   s_distortion2         s1       1
//   s_sceneDepth          s2       1
//   mtbSampleSlot1        s3       1
//   mtbSampleSlot2        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 };
//
//   distortionBufferScale
//     c9   = { 0, 0, 0, 0 };
//
//   normalMapBias
//     c10  = { 0, 0, 0, 0 };
//
//   distortionStrength
//     c11  = { 0, 0, 0, 0 };
//
//   diffuseColor
//     c12  = { 0, 0, 0, 0 };
//
//   depthTintColor
//     c13  = { 0, 0, 0, 0 };
//
//   depthTintNearDistance
//     c14  = { 0, 0, 0, 0 };
//
//   depthTintFarDistance
//     c15  = { 0, 0, 0, 0 };
//
//   depthTintAmount
//     c16  = { 0, 0, 0, 0 };
//
//   depthFogColor
//     c17  = { 0, 0, 0, 0 };
//
//   depthFogNearDistance
//     c18  = { 0, 0, 0, 0 };
//
//   depthFogFarDistance
//     c19  = { 0, 0, 0, 0 };
//
//   depthFogAmount
//     c20  = { 0, 0, 0, 0 };
//
//   Ambient
//     c21  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

    ps_3_0
    def c22, 0.00100000005, 1, 0.5, 10
    def c23, 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
    texld_pp r0, v1.zwzw, s4
    mad_pp r0.xy, r0, c23.x, c23.y
    add_pp r0.zw, -r0.xyxy, c22.x
    mad_pp r0.xy, c10.x, r0.zwzw, r0
    mov r1.yw, c22
    mul_pp r0.z, r1.w, c11.x
    mul_pp r0.xy, r0, r0.z
    mov r0.zw, c23.z
    add r2, -r0, v2
    texldp r2, r2, s2
    add_sat r1.x, r2.w, -v2.w
    mad r0, r1.x, -r0, v2
    mul r1.x, r0.w, c9.x
    min r2.xy, r1.x, 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
    dp3 r0.w, v5, c22.xxyw
    mad_sat_pp r0.w, r0.w, c22.z, c22.z
    mul_pp r0.w, r0.w, r0.w
    lrp_pp r2.x, r0.w, r1.y, c21.w
    texld_pp r1, v0, s3
    mul_pp r1.xyz, r1, c12
    mul_pp r2.xyz, r2.x, r1
    mul_pp r3.xyz, r2, c21
    mov_pp r4.xyz, c21
    mad_pp r2.xyz, r4, -r2, c7
    mad_pp r2.xyz, v2.z, r2, r3
    texld_pp r3, v1, s3
    lrp_pp r4.xyz, r3.w, r2, r0
    mad r0.xyz, r4, c13, -r4
    add r0.w, r2.w, -c14.x
    add r1.w, r2.w, -c18.x
    rcp r2.x, c15.x
    mul_sat_pp r0.w, r0.w, r2.x
    mul r0.w, r0.w, c16.x
    mad_pp r0.xyz, r0.w, r0, r4
    rcp r0.w, c19.x
    mul_sat_pp r0.w, r1.w, r0.w
    mul r0.w, r0.w, c20.x
    lrp_pp r2.xyz, r0.w, c17, r0
    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
    mad r0.xyz, r0, -c4.w, c4
    nrm_pp r3.xyz, r0
    mul_pp r0.xyz, c22.x, v4
    mad_pp r0.xyz, v3, c22.x, r0
    add_pp r0.xyz, r0, v5
    nrm_pp r4.xyz, r0
    dp3_sat_pp r0.x, r3, r4
    texldp_pp r3, v2, s5
    dp4_sat_pp r0.y, r3, c6
    add_pp r0.y, -r0.y, c22.y
    mul_sat_pp r0.y, r0.y, v4.w
    mul_pp r0.yzw, r0.y, c5.xxyz
    mul_pp r0.xyz, r0.x, r0.yzww
    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 68 instruction slots used (8 texture, 60 arithmetic)
 

