//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float4 Ambient;
//   float3 diffuseColor;
//   float distortionBufferScale;
//   float distortionStrength;
//   float4 fogColor;
//   float globalOpacity;
//   
//   struct
//   {
//       float4 worldVector;
//       float4 color;
//       float4 channelMask;
//
//   } lights;
//   
//   sampler2D mtbSampleSlot1;
//   sampler2D mtbSampleSlot2;
//   sampler2D mtbSampleSlot3;
//   float4 nvidiaHack;
//   sampler2D s_distortion;
//   sampler2D s_distortion2;
//   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
//   distortionStrength    c12      1
//   specularColor         c13      1
//   diffuseColor          c14      1
//   Ambient               c15      1
//   worldEyePos           c16      1
//   nvidiaHack            c31      1
//   s_distortion          s0       1
//   s_distortion2         s1       1
//   mtbSampleSlot1        s2       1
//   mtbSampleSlot2        s3       1
//   mtbSampleSlot3        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 };
//
//   distortionStrength
//     c12  = { 0, 0, 0, 0 };
//
//   specularColor
//     c13  = { 0, 0, 0, 0 };
//
//   diffuseColor
//     c14  = { 0, 0, 0, 0 };
//
//   Ambient
//     c15  = { 0, 0, 0, 0 };
//
//   worldEyePos
//     c16  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

    ps_3_0
    def c17, 0.5, 10, -0.5, 0
    def c18, 2, -1, 1, 1.00000001e-007
  dcl_texcoord8 v9.x
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xy
    dcl_texcoord6 v2
    dcl_texcoord7 v3.w
    dcl_texcoord3_pp v4.xyz
    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
    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, c16
    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, c18.x, c18.y
    mul_pp r3.xyz, r0.y, v5
    mad_pp r3.xyz, r0.x, v4, r3
    mad_pp r3.xyz, r0.z, v6, 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, c18
    add_pp r1.y, r1.w, c11.x
    pow_pp r2.x, r1.x, r1.y
    texldp_pp r3, v2, s5
    dp4_sat_pp r1.x, r3, c6
    add_pp r1.x, -r1.x, c18.z
    mul_sat_pp r1.x, r1.x, v5.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, s3
    mul_pp r3.xyz, r3.x, c13
    texld_pp r4, v0, s2
    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, v6, r0
    mul_pp r0.xy, r0, -c12.x
    mad_sat_pp r0.z, r0.z, c17.x, c17.x
    mul_pp r0.z, r0.z, r0.z
    lrp_pp r2.x, r0.z, r1.z, c15.w
    mul_pp r2.xyz, r4, r2.x
    mad_pp r1.xyz, c15, r2, r1.xyww
    lrp_pp r2.xyz, v2.z, c7, r1
    mul_pp r0.xy, r0, c17.y
    mov r0.zw, c17.w
    add r0, r0, v2
    mul r1.x, r0.w, c10.x
    min r3.xy, r1.x, r0
    mov r3.zw, r0
    texldp_pp r0, r3, s0
    texldp_pp r1, r3, s1
    mad_pp r0.xyz, r0, r1.w, r1
    mul r0.w, c9.x, v3.w
    texld_pp r1, v1, s3
    mad_pp r0.w, r1.y, r0.w, c31.x
    add r1, r1.y, c17.z
    mad_pp oC0.xyz, r2, r0.w, r0
    mul_pp oC0.w, c8.x, v2.w
    texkill r1

// approximately 70 instruction slots used (7 texture, 63 arithmetic)
 

