//
// Generated by Microsoft (R) D3DX9 Shader Compiler 
//
// Parameters:
//
//   float4 Ambient;
//   float distortionBufferScale;
//   float3 edgeDiffuseColor;
//   float edgeOpacityScale;
//   float3 edgeSelfIlluminationColor;
//   float3 facingDiffuseColor;
//   float facingOpacityScale;
//   float3 facingSelfIlluminationColor;
//   float4 fogColor;
//   float globalOpacity;
//   float hardness;
//   
//   struct
//   {
//       float4 worldVector;
//       float4 color;
//       float4 channelMask;
//
//   } lights;
//   
//   sampler2D mtbSampleSlot1;
//   sampler2D mtbSampleSlot2;
//   sampler2D mtbSampleSlot3;
//   float4 nvidiaHack;
//   sampler2D s_distortion;
//   sampler2D s_distortion2;
//   sampler2D s_luminanceMap1;
//   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
//   globalOpacity               c9       1
//   distortionBufferScale       c10      1
//   edgeSelfIlluminationColor   c11      1
//   facingSelfIlluminationColor c12      1
//   edgeDiffuseColor            c13      1
//   facingDiffuseColor          c14      1
//   hardness                    c15      1
//   edgeOpacityScale            c16      1
//   facingOpacityScale          c17      1
//   Ambient                     c18      1
//   nvidiaHack                  c31      1
//   s_distortion                s0       1
//   s_distortion2               s1       1
//   mtbSampleSlot1              s2       1
//   mtbSampleSlot2              s3       1
//   mtbSampleSlot3              s4       1
//   s_luminanceMap1             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 };
//
//   globalOpacity
//     c9   = { 0, 0, 0, 0 };
//
//   distortionBufferScale
//     c10  = { 0, 0, 0, 0 };
//
//   edgeSelfIlluminationColor
//     c11  = { 0, 0, 0, 0 };
//
//   facingSelfIlluminationColor
//     c12  = { 0, 0, 0, 0 };
//
//   edgeDiffuseColor
//     c13  = { 0, 0, 0, 0 };
//
//   facingDiffuseColor
//     c14  = { 0, 0, 0, 0 };
//
//   hardness
//     c15  = { 0, 0, 0, 0 };
//
//   edgeOpacityScale
//     c16  = { 0, 0, 0, 0 };
//
//   facingOpacityScale
//     c17  = { 0, 0, 0, 0 };
//
//   Ambient
//     c18  = { 0, 0, 0, 0 };
//
//   nvidiaHack
//     c31  = { 0, 0, 0, 0 };
//

    ps_3_0
    def c19, 2, -1, 1, 1.00100005
    def c20, 0.5, 0, 0, 0
  dcl_texcoord8 v9.x
    dcl_texcoord v0.zw
    dcl_texcoord1 v1
    dcl_texcoord2 v2
    dcl_texcoord6 v3
    dcl_texcoord7 v4
    dcl_texcoord3_pp v5
    dcl_texcoord4_pp v6
    dcl_texcoord5_pp v7.xyz
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    dcl_2d s3
    dcl_2d s4
    dcl_2d s5
    dcl_2d s6
    mov_pp r0.x, v5.w
    mov_pp r0.y, v6.w
    texld_pp r0, r0, s5
    texldp_pp r1, v3, s6
    dp4_sat_pp r0.x, r1, c6
    add_pp r0.x, -r0.x, c19.z
    mul_sat_pp r0.x, r0.y, r0.x
    mul_pp r0.xyz, r0.x, c5
    mul r1.xyz, c1, v3.y
    mad r1.xyz, v9.x, c0, r1
    mad r1.xyz, v3.w, c2, r1
    add r1.xyz, r1, c3
    mad r1.xyz, r1, -c4.w, c4
    nrm_pp r2.xyz, r1
    texld_pp r1, v0.wzzw, s4
    mad_pp r1.xyz, r1.wyzw, c19.x, c19.y
    mul_pp r3.xyz, r1.y, v6
    mad_pp r3.xyz, r1.x, v5, r3
    mad_pp r3.xyz, r1.z, v7, r3
    nrm_pp r4.xyz, r3
    dp3_sat_pp r0.w, r2, r4
    mul_pp r0.xyz, r0, r0.w
    nrm r2.xyz, v4
    dp3 r0.w, r1, r2
    dp3 r1.x, v7, r1
    add_sat_pp r0.w, -r0_abs.w, c19.z
    mov r1.zw, c19
    mul_pp r1.y, r1.w, c15.x
    pow_pp r2.x, r0.w, r1.y
    add_pp r0.w, -r2.x, c19.z
    texld_pp r2, v2, s2
    mul_pp r2.xyz, r2, c13
    texld_pp r3, v2.wzzw, s2
    mad_pp r4.xyz, r3, c14, -r2
    mad_pp r2.xyz, r0.w, r4, r2
    mov_pp r4.xyz, c11
    mad_pp r3.xyz, r3, c12, -r4
    mul_pp r0.xyz, r0, r2
    mad_sat_pp r1.x, r1.x, c20.x, c20.x
    mul_pp r1.x, r1.x, r1.x
    lrp_pp r2.w, r1.x, r1.z, c18.w
    mul_pp r1.xyz, r2, r2.w
    mad_pp r0.xyz, c18, r1, r0
    mad_pp r1.xyz, r0.w, r3, c11
    add_pp r0.xyz, r0, r1
    lrp_pp r1.xyz, v3.z, c7, r0
    mul r0.x, c10.x, v3.w
    min r2.xy, r0.x, v3
    mov r2.zw, v3
    texldp_pp r3, r2, s0
    texldp_pp r2, r2, s1
    mad_pp r0.xyz, r3, r2.w, r2
    texld_pp r2, v1.wzzw, s3
    texld_pp r3, v1, s3
    mul_pp r1.w, r3.x, c16.x
    mad_pp r2.x, r2.x, c17.x, -r1.w
    mad_pp r0.w, r0.w, r2.x, r1.w
    mul r1.w, c9.x, v4.w
    mad_pp r0.w, r0.w, r1.w, c31.x
    mad_pp oC0.xyz, r1, r0.w, r0
    mul_pp oC0.w, c8.x, v3.w

// approximately 69 instruction slots used (9 texture, 60 arithmetic)
 

