//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:21:01 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[31], immediateIndexed
dcl_constantbuffer cb2[28], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s5, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
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) 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 13
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) r3.xyzw, r0.xyxx, t2.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyxx, t0.xyzw, s0
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.z, r0.xyxx, r0.xyxx
mad r0.zw, -r0.zzzz, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
sqrt r0.z, r0.z
mul r5.xy, r0.zzzz, r0.xyxx
mov r5.z, -r0.w
add r0.x, -r3.x, l(1.000000)
dp3 r0.y, -r1.xyzx, -r1.xyzx
rsq r0.y, r0.y
mul r2.xyw, r0.yyyy, -r1.xyxz
mov r5.w, l(1.000000)
dp4 r0.z, cb2[6].xyzw, r5.xyzw
dp4 r0.w, cb2[7].xyzw, r5.xyzw
dp4 r5.w, cb2[8].xyzw, r5.xyzw
log r6.x, r0.z
log r6.y, r0.w
log r6.z, r5.w
mul r6.xyz, r6.xyzx, l(2.200000, 2.200000, 2.200000, 0.000000)
exp r6.xyz, r6.xyzx
dp3 r0.z, r5.xyzx, r2.xywx
mov_sat r0.w, r0.z
add r5.w, -r0.w, l(1.000000)
log r5.w, r5.w
mad r3.w, r3.w, l(255.000000), l(-1.000000)
lt r3.w, |r3.w|, l(0.250000)
lt r6.w, r2.z, cb2[9].w
if_nz r6.w
  lt r7.xy, r2.zzzz, cb2[10].yxyy
  if_nz r7.x
    mov r1.w, l(1.000000)
    dp4 r8.x, cb2[11].xyzw, r1.xyzw
    dp4 r8.y, cb2[12].xyzw, r1.xyzw
    dp4 r6.w, cb2[13].xyzw, r1.xyzw
    mov r8.z, l(0)
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r6.w, r8.xyzx, t5.xxxx, s5, r6.w
  else 
    mov r6.w, l(1.000000)
  endif 
  lt r7.xz, cb2[10].xxyx, r2.zzzz
  if_nz r7.x
    mov r1.w, l(1.000000)
    dp4 r8.x, cb2[14].xyzw, r1.xyzw
    dp4 r8.y, cb2[15].xyzw, r1.xyzw
    dp4 r1.w, cb2[16].xyzw, r1.xyzw
    mov r8.z, l(1.000000)
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.w, r8.xyzx, t5.xxxx, s5, r1.w
  else 
    mov r1.w, l(1.000000)
  endif 
  movc r1.w, r7.z, r1.w, l(1.000000)
  movc r1.w, r7.y, r6.w, r1.w
  dp3 r2.z, r1.xyzx, r1.xyzx
  div_sat r2.z, r2.z, cb2[24].x
  mul r2.z, r2.z, r2.z
  mul r2.z, r2.z, r2.z
  mad r2.z, -r2.z, r2.z, l(1.000000)
  add r1.w, r1.w, l(-1.000000)
  mad r1.w, r2.z, r1.w, l(1.000000)
else 
  mov r1.w, l(1.000000)
endif 
mul r7.xyz, r4.wwww, r4.xyzx
dp3 r2.z, r5.xyzx, cb2[1].xyzx
max r6.w, r2.z, l(0.000000)
min r7.w, r6.w, l(1.000000)
mov_sat r8.x, cb12[30].y
add r8.x, -r8.x, l(1.000000)
mul r8.y, r8.x, r8.x
mul r8.y, r8.y, r8.y
mad r8.x, -r8.x, r8.y, l(1.000000)
if_nz r3.w
  dp3 r3.w, r3.xyzx, cb2[1].xyzx
  dp3 r8.y, r3.xyzx, r2.xywx
  mul r8.z, r3.w, r3.w
  min r8.z, r8.z, l(1.000000)
  add r8.z, -r8.z, l(1.000000)
  mul r8.w, r8.y, r8.y
  min r8.w, r8.w, l(1.000000)
  add r8.w, -r8.w, l(1.000000)
  sqrt r8.zw, r8.zzzw
  sincos r9.x, r10.x, cb12[29].y
  mul r9.x, r8.z, r9.x
  mad r9.x, -r3.w, r10.x, -r9.x
  mad r9.y, -r9.x, r9.x, l(1.000000)
  sqrt r9.y, r9.y
  mul r9.y, r8.w, r9.y
  mad r9.x, r9.x, r8.y, r9.y
  max r9.x, r9.x, l(0.000000)
  log r9.x, r9.x
  mul r9.x, r9.x, cb12[28].w
  exp r9.x, r9.x
  mad_sat r9.x, cb12[28].z, r9.x, r6.w
  min r4.w, r4.w, r9.x
  sincos r9.x, r10.x, cb12[29].x
  mul r8.z, r8.z, r9.x
  mad r3.w, -r3.w, r10.x, -r8.z
  mad r8.z, -r3.w, r3.w, l(1.000000)
  sqrt r8.z, r8.z
  mul r8.z, r8.w, r8.z
  mad r3.w, r3.w, r8.y, r8.z
  max r3.w, r3.w, l(0.000000)
  log r3.w, r3.w
  mul r3.w, r3.w, cb12[28].y
  exp r3.w, r3.w
  mul r3.w, r3.w, cb12[28].x
  mul r8.yzw, r3.wwww, cb2[2].xxyz
  mul r8.yzw, r7.wwww, r8.yyzw
  mov r9.xyz, l(0,0,0,0)
  mov r3.w, l(0)
else 
  mul r3.w, r3.z, l(100.000000)
  mad r3.z, r3.x, l(10.000000), l(1.000000)
  exp r3.z, r3.z
  add r9.w, r0.z, r0.z
  mad r10.xyz, r9.wwww, r5.xyzx, -r2.xywx
  add r3.x, -r3.x, l(3.000000)
  mul r3.x, r5.w, r3.x
  exp r3.x, r3.x
  mul r3.x, r3.x, l(0.250000)
  mov r10.w, l(1.000000)
  dp4 r9.w, cb2[6].xyzw, r10.xyzw
  dp4 r11.x, cb2[7].xyzw, r10.xyzw
  dp4 r10.x, cb2[8].xyzw, r10.xyzw
  log r12.x, r9.w
  log r12.y, r11.x
  log r12.z, r10.x
  mul r10.xyz, r12.xyzx, l(2.200000, 2.200000, 2.200000, 0.000000)
  exp r10.xyz, r10.xyzx
  mul r10.xyz, r3.xxxx, r10.xyzx
  mul r9.xyz, r3.yyyy, r10.xyzx
  mad r3.x, r8.x, l(-0.980000), l(1.000000)
  mul r9.w, r3.x, r3.z
  mad r10.xyz, -r5.xyzx, r0.zzzz, r2.xywx
  mad r11.xyz, -r5.xyzx, r2.zzzz, cb2[1].xyzx
  dp3 r10.x, r10.xyzx, r11.xyzx
  mul r10.y, r0.x, r0.x
  mad r10.zw, r0.xxxx, r0.xxxx, l(0.000000, 0.000000, 0.570000, 0.090000)
  div r10.yz, r10.yyyy, r10.zzwz
  mul r10.z, r10.z, l(0.450000)
  mad r10.y, -r10.y, l(0.500000), l(1.000000)
  mad r10.w, -r0.z, r0.z, l(1.000000)
  mad r11.x, -r2.z, r2.z, l(1.000000)
  mul_sat r10.w, r10.w, r11.x
  sqrt r10.w, r10.w
  max r0.z, r0.z, r2.z
  div r0.z, r10.w, r0.z
  max r10.x, r10.x, l(0.000000)
  mul r10.x, r10.x, r10.z
  mad r0.z, r10.x, r0.z, r10.y
  mul r4.w, r0.z, r6.w
  mad r1.xyz, -r1.xyzx, r0.yyyy, cb2[1].xyzx
  dp3 r0.y, r1.xyzx, r1.xyzx
  rsq r0.y, r0.y
  mul r1.xyz, r0.yyyy, r1.xyzx
  dp3_sat r0.y, r2.xywx, r1.xyzx
  dp3_sat r0.z, r1.xyzx, r5.xyzx
  mad r1.x, r3.z, r3.x, l(2.000000)
  mul r1.x, r1.x, l(0.159154937)
  log r1.y, r0.z
  mul r1.y, r1.y, r9.w
  exp r1.y, r1.y
  mul r1.x, r1.y, r1.x
  max r1.y, r0.y, l(1.192092896E-007)
  min r1.z, r0.w, r7.w
  add r0.z, r0.z, r0.z
  mul r3.x, r0.z, r1.z
  ge r3.x, r1.y, r3.x
  eq r1.z, r0.w, r1.z
  div r3.z, r7.w, r0.w
  movc r1.z, r1.z, l(1.000000), r3.z
  mul r0.z, r0.z, r1.z
  div r0.z, r0.z, r1.y
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  movc r0.z, r3.x, r0.z, r0.w
  add r0.y, -r0.y, l(1.000000)
  mul r0.w, r0.y, r0.y
  mul r0.w, r0.w, r0.w
  mul r1.y, r0.w, r0.y
  mad r0.y, -r0.y, r0.w, l(1.000000)
  mad r0.y, r0.y, l(0.200000), r1.y
  min r0.y, r0.y, l(1.000000)
  mul r0.y, r0.z, r0.y
  mul r0.y, r1.x, r0.y
  mul r0.y, r0.y, l(0.250000)
  min r0.y, r0.y, l(15.000000)
  mul r0.y, r3.y, r0.y
  mul r0.y, r0.y, l(3.14159274)
  mul r0.yzw, r0.yyyy, cb2[2].xxyz
  mul r8.yzw, r7.wwww, r0.yyzw
endif 
mul r0.y, r5.w, l(0.010000)
exp r0.y, r0.y
dp3_sat r0.z, r2.xywx, -cb2[1].xyzx
mul r0.y, r0.z, r0.y
mul r0.y, r7.w, r0.y
mul r0.x, r0.x, r0.y
mul r0.xyz, r0.xxxx, cb2[2].xyzx
mad r0.xyz, cb2[2].xyzx, r4.wwww, r0.xyzx
mov_sat r0.w, -r2.z
mul r1.xyz, r7.xyzx, r0.wwww
mad r0.xyz, cb2[2].xyzx, r1.xyzx, r0.xyzx
add r0.w, r2.z, r3.w
add r1.x, r3.w, l(1.000000)
div_sat r0.w, r0.w, r1.x
add r0.w, -r7.w, r0.w
max r0.w, r0.w, l(0.000000)
mul r1.xyz, r0.wwww, cb2[2].xyzx
mad r0.xyz, r1.xyzx, r4.xyzx, r0.xyzx
mad r0.w, r8.x, l(-0.500000), l(1.000000)
mul r1.xyz, r0.wwww, r8.yzwy
mad o1.xyz, r1.xyzx, r1.wwww, r9.xyzx
mov o1.w, l(1.000000)
mad r0.xyz, r0.xyzx, r1.wwww, r6.xyzx
mov r0.w, l(0)
div o0.xyzw, r0.xyzw, l(3.000000, 3.000000, 3.000000, 3.000000)
ret 
// Approximately 0 instruction slots used
