//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:21:15 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[28], immediateIndexed
dcl_constantbuffer cb2[28], dynamicIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_comparison
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2darray (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_output o1.xyzw
//dcl_temps 7
dcl_temps 28

mul r0.xy, v0.xyxx, cb2[27].xyxx
mul r0.xy, r0.xyxx, cb2[0].xyxx
mul r1.x, v0.x, cb2[0].x
deriv_rtx_coarse r0.z, r0.x
deriv_rty_coarse r0.w, r0.y
sample_d_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t3.yzxw, s3, r0.zzzz, r0.wwww
ge r0.w, l(0.010000), r0.z
if_nz r0.w
  mul r2.z, r0.z, l(100.000000)
  mov r3.xyzw, cb12[24].xyzw
  mov r4.xyzw, cb12[25].xyzw
  mov r5.xyzw, cb12[26].xyzw
  mov r6.xyzw, cb12[27].xyzw
else 
  mad r2.z, r0.z, l(1.010000), l(-0.010000)
  mov r3.xyzw, cb12[20].xyzw
  mov r4.xyzw, cb12[21].xyzw
  mov r5.xyzw, cb12[22].xyzw
  mov r6.xyzw, cb12[23].xyzw
endif 
mad r1.z, -v0.y, cb2[0].y, l(1.000000)
mad r2.xy, r1.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mov r2.w, l(1.000000)
dp4 r1.x, r3.xyzw, r2.xyzw
dp4 r1.y, r4.xyzw, r2.xyzw
dp4 r1.z, r5.xyzw, r2.xyzw
dp4 r0.z, r6.xyzw, r2.xyzw
div r1.xyz, r1.xyzx, r0.zzzz

ld_indexable(texture2d)(float,float,float,float) r28.xyzw, l(0, 0, 0, 0), t125.xyzw
add r28.w, r1.z, -r28.y
mul r28.w, r28.w, r28.x
mul r28.w, r28.w, cb12[20].x
add r1.x, r1.x, -r28.w

sample_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t2.xywz, s2
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t1.xyzw, s1
mad r0.xy, r0.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000), l(-2.000000, -2.000000, 0.000000, 0.000000)
dp2 r0.x, r0.xyxx, r0.xyxx
mad r0.x, -r0.x, l(0.500000), l(1.000000)
mad r0.y, r0.z, l(255.000000), l(-1.000000)
lt r0.y, |r0.y|, l(0.250000)
max r0.x, r0.x, l(0.000000)
add r0.z, -r0.x, l(1.000000)
sqrt r0.z, r0.z
mad r0.w, r0.x, l(-0.0187292993), l(0.074261)
mad r0.w, r0.w, r0.x, l(-0.212114394)
mad r0.x, r0.w, r0.x, l(1.57072878)
mul r0.x, r0.z, r0.x
sincos r0.x, r2.x, r0.x
div r0.x, r0.x, r2.x
mul r0.x, r0.x, l(0.080000)
mov r1.w, l(1.000000)
dp4 r2.x, cb2[11].xyzw, r1.xyzw
dp4 r2.y, cb2[12].xyzw, r1.xyzw
dp4 r0.z, cb2[13].xyzw, r1.xyzw
min r0.z, r0.z, l(0.999999)
ftou r0.w, cb2[9].y
div r3.xy, l(1.000000, 1.000000, 1.000000, 1.000000), cb2[r0.w + 21].xyxx
movc r0.x, r0.y, -r0.x, l(-0.275000)
add r0.x, r0.x, r0.z
mov r2.z, cb2[9].y
sample_indexable(texture2darray)(float,float,float,float) r0.y, r2.xyzx, t4.yxzw, s4
mov r4.z, cb2[9].y
mov r2.zw, l(0,0,0,0)
mov r3.z, l(0)
loop 
  ige r0.z, r3.z, l(5)
  breakc_nz r0.z
  iadd r3.zw, r3.zzzz, l(0, 0, 1, -2)
  itof r5.x, r3.w
  mov r5.zw, r2.zzzw
  mov r6.x, l(0)
  loop 
    ige r0.z, r6.x, l(5)
    breakc_nz r0.z
    iadd r6.xy, r6.xxxx, l(1, -2, 0, 0)
    itof r5.y, r6.y
    mad r4.xy, r5.xyxx, r3.xyxx, r2.xyxx
    sample_indexable(texture2darray)(float,float,float,float) r0.z, r4.xyzx, t4.yzxw, s4
    lt r1.w, r0.z, r0.x
    add r4.x, r0.z, r5.z
    add r4.y, r5.w, l(1.000000)
    movc r5.zw, r1.wwww, r4.xxxy, r5.zzzw
  endloop 
  mov r2.zw, r5.zzzw
endloop 
ne r0.z, r2.w, l(0.000000)
if_nz r0.z
  ge r0.y, r0.y, r0.x
  and r0.y, r0.y, l(0x3f800000)
  div r0.z, r2.z, r2.w
  add r1.w, -cb2[r0.w + 21].z, cb2[r0.w + 21].w
  mad r2.z, r1.w, r0.x, cb2[r0.w + 21].z
  mad r0.z, r1.w, r0.z, cb2[r0.w + 21].z
  add r1.w, -r0.z, r2.z
  mul_sat r1.w, r1.w, l(0.00781250000)
  add r0.w, l(0.001000), cb2[r0.w + 21].z
  lt r0.z, r0.z, r0.w
  mad r0.w, r1.w, l(1.800000), l(0.100000)
  movc r0.z, r0.z, l(1.900000), r0.w
  mov r4.z, cb2[9].y
  mov r0.w, r0.y
  mov r1.w, l(0)
  loop 
    ige r2.z, r1.w, l(5)
    breakc_nz r2.z
    itof r2.z, r1.w
    add r2.z, r2.z, l(-2.000000)
    mul r5.x, r0.z, r2.z
    mov r2.z, r0.w
    mov r2.w, l(0)
    loop 
      ige r3.z, r2.w, l(5)
      breakc_nz r3.z
      itof r3.z, r2.w
      add r3.z, r3.z, l(-2.000000)
      mul r5.y, r0.z, r3.z
      mul r3.zw, r3.xxxy, r5.xxxy
      mad r4.xy, r3.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000), r2.xyxx
      sample_c_lz_indexable(texture2darray)(float,float,float,float) r3.z, r4.xyzx, t5.xxxx, s5, r0.x
      add r2.z, r2.z, r3.z
      iadd r2.w, r2.w, l(1)
    endloop 
    mov r0.w, r2.z
    iadd r1.w, r1.w, l(1)
  endloop 
  mul r0.x, r0.w, l(0.040000)
else 
  mov r0.x, l(1.000000)
endif 
dp3 r0.y, r1.xyzx, r1.xyzx
div_sat r0.y, r0.y, cb2[24].x
mul r0.y, r0.y, r0.y
mul r0.y, r0.y, r0.y
mad r0.y, -r0.y, r0.y, l(1.000000)
add r0.x, r0.x, l(-1.000000)
mad r0.xyz, r0.yyyy, r0.xxxx, l(1.000000, 1.000000, 1.000000, 0.000000)
mov o0.xyzw, r0.zzzz
mov o1.xyz, r0.xyzx
mov o1.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
