//
// Generated by Microsoft (R) HLSL Shader Compiler 9.22.949.2248
//
//   fxc /Zi /Tps_3_0 /Fc1.txt /EZoneWetSurface_PS effects.psh
//
//
// Parameters:
//
//   float3 EyeVector;
//   float4x4 ShadowTrans;
//   float4x4 ZoneMat;
//   sampler2D s0;
//   sampler2D s1;
//   sampler2D s3;
//   sampler2D s4;
//   samplerCUBE s7;
//   float3 smax;
//   float4 smin;
//
//
// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   ShadowTrans  c0       4
//   ZoneMat      c4       3
//   EyeVector    c7       1
//   smin         c8       1
//   smax         c9       1
//   s0           s0       1
//   s1           s1       1
//   s3           s3       1
//   s4           s4       1
//   s7           s7       1
//

    ps_3_0
    def c10, 0, 1, 0.75, -1
    def c11, 2, -1, 0.00999999978, 1
    dcl_texcoord v0.xy  // In<4,5>
    dcl_texcoord1 v1.xyz  // In<6,7,8>
    dcl_2d s0
    dcl_2d s1
    dcl_2d s3
    dcl_2d s4
    dcl_cube s7

#line 1267 "G:\nick\sources\bin\blacklabel\pshaders\effects.psh"
    texld r0, v0, s1  // ::normalTex<0,1,2,3>
    mad r0.xyz, r0.yxzw, c11.x, c11.y  // ::normal<1,0,2>
    texld r1, v0, s4  // ::z<0>

#line 1272
    mad r2.xyz, v1, r1.x, c7  // ::position<0,1,2>
    mul r1.xyz, r1.x, v1  // ::View2Pos<0,1,2>

#line 1278
    mul r3.xy, r2.xzzw, c11.z
    texld r3, r3, s3  // ::normalNoiseTex<3,1,0>
    mad r3.xy, r3.wyzw, c11.x, c11.y  // ::normalNoiseTex<0,1>
    mad r0.w, r3.x, -r3.x, c11.w
    mad r0.w, r3.y, -r3.y, r0.w
    rsq r0.w, r0.w
    rcp r3.z, r0.w  // ::normalNoiseTex<2>

#line 1283
    add r0.yzw, r0.xyxz, r3.xxyz  // ::normal<0,1,2>
    mov_sat r0.x, r0.x  // ::angle<0>

#line 1306
    dp3 r1.w, r1, r0.yzww
    add r1.w, r1.w, r1.w
    mad r0.yzw, r0, -r1.w, r1.xxyz
    nrm r1.xyz, r0.yzww  // ::ReflectCoord<0,1,2>
    texld r1, r1, s7  // ::CubeRef<0,1,2,3>
    mad r1, r1, c10.z, c10.w

#line 1285
    mov r2.w, c11.w

#line 1292
    dp4 r0.y, r2, c3  // ::posLight<3>

#line 970
    rcp r0.y, r0.y

#line 1292
    dp4 r0.z, r2, c0  // ::posLight<0>
    dp4 r0.w, r2, c1  // ::posLight<1>

#line 970
    mul r0.yz, r0.y, r0.xzww  // ::tc_dw<0,1>
    texld r3, r0.yzzw, s0

#line 1292
    dp4 r0.y, r2, c2  // ::posLight<2>

#line 971
    add_pp r0.y, -r3.x, r0.y  // ::test<0>
    cmp_pp r0.y, -r0.y, c10.y, c10.x  // ::compare<0>

#line 1304
    mul_pp r0.x, r0.x, r0.y  // ::shadow<0>

#line 1308
    mul_pp r0.x, r0.x, c8.w  // ::shadow<0>
    mad r0, r0.x, r1, c11.w  // ::ZoneWetSurface_PS<0,1,2,3>

#line 1285
    dp4 r1.x, r2, c6  // ::cmp_pos<2>

#line 1290
    add r1.y, -r1.x, c8.z
    add r1.x, r1.x, -c9.z
    cmp r1.xy, r1, c10.x, c10.y
    mul r1.x, r1.x, r1.y
    cmp r0, -r1.x, c11.w, r0  // ::ZoneWetSurface_PS<0,1,2,3>

#line 1285
    dp4 r1.x, r2, c5  // ::cmp_pos<1>
    dp4 r1.y, r2, c4  // ::cmp_pos<0>

#line 1288
    add r1.z, -r1.x, c8.y
    add r1.x, r1.x, -c9.y
    cmp r1.xz, r1, c10.x, c10.y
    mul r1.x, r1.x, r1.z
    cmp r0, -r1.x, c11.w, r0  // ::ZoneWetSurface_PS<0,1,2,3>
    add r1.x, -r1.y, c8.x
    add r1.y, r1.y, -c9.x
    cmp r1.xy, r1, c10.x, c10.y
    mul r1.x, r1.y, r1.x
    cmp oC0, -r1.x, c11.w, r0  // ::ZoneWetSurface_PS<0,1,2,3>

// approximately 53 instruction slots used (5 texture, 48 arithmetic)
