//
// 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[30], immediateIndexed
dcl_constantbuffer cb2[23], 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_sampler s7, mode_default
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) t7
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 10
dcl_temps 28

mul r0.xy, v0.xyxx, cb2[22].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

add r2.xyz, -r1.xyzx, cb2[1].xyzx
dp3 r0.z, r2.xyzx, r2.xyzx
sqrt r0.w, r0.z
div_sat r0.w, r0.w, cb2[1].w
log r0.w, r0.w
mul r0.w, r0.w, cb2[3].z
exp r0.w, r0.w
mad_sat r0.w, cb2[3].y, r0.w, cb2[3].x
add r0.w, -r0.w, l(1.000000)
log r0.w, r0.w
mul r0.w, r0.w, l(2.200000)
exp r0.w, r0.w
ge r2.w, l(0.001000), r0.w
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t2.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r4.x, r0.xyxx, t0.wxyz, s0
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t1.xyzw, s1
mov r1.w, l(1.000000)
dp4 r5.x, cb2[11].xyzw, r1.xyzw
dp4 r5.y, cb2[12].xyzw, r1.xyzw
dp4 r5.z, cb2[13].xyzw, r1.xyzw
dp4 r1.w, cb2[14].xyzw, r1.xyzw
div r4.yzw, r5.xxyz, r1.wwww
add r1.w, cb2[20].y, l(-0.500000)
mad r5.xy, -r1.wwww, l(2.000000, -2.000000, 0.000000, 0.000000), r4.yzyy
add r1.w, cb2[20].z, cb2[20].z
div r5.xy, r5.xyxx, r1.wwww
mad r5.xy, r5.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t7.xyzw, s7
if_nz r2.w
  mov o0.xyzw, l(0,0,0,0)
  mov o1.xyzw, l(0,0,0,0)
  ret 
endif 
rsq r0.z, r0.z
mul r2.xyz, r0.zzzz, r2.xyzx
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 r6.xy, -r0.zzzz, l(0.250000, 0.500000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
sqrt r0.z, r6.x
mul r0.xy, r0.zzzz, r0.xyxx
mov r0.z, -r6.y
add r1.w, -r3.x, l(1.000000)
dp3 r2.w, -r1.xyzx, -r1.xyzx
rsq r2.w, r2.w
mul r6.xyz, -r1.xyzx, r2.wwww
mad r7.xy, r4.yzyy, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
add r4.y, r4.w, -cb2[15].x
mov r7.z, l(0)
sample_c_lz_indexable(texture2darray)(float,float,float,float) r4.y, r7.xyzx, t5.xxxx, s5, r4.y
add r7.w, -r7.y, l(1.000000)
add r4.zw, r7.xxxw, -cb2[20].yyyy
div r4.zw, r4.zzzw, cb2[20].zzzz
dp2 r4.z, r4.zwzz, r4.zwzz
sqrt r4.z, r4.z
log r4.z, r4.z
mul r4.z, r4.z, cb2[20].x
exp r4.z, r4.z
min r4.z, r4.z, l(1.000000)
add r4.z, -r4.z, l(1.000000)
mul r4.y, r4.z, r4.y
dp3 r4.z, r1.xyzx, r1.xyzx
div_sat r4.z, r4.z, cb2[19].x
mul r4.z, r4.z, r4.z
mul r4.z, r4.z, r4.z
mad r4.z, -r4.z, r4.z, l(1.000000)
mul r4.y, r4.y, r4.z
mul r0.w, r0.w, r4.y
dp3 r4.y, r0.xyzx, r2.xyzx
max r4.z, r4.y, l(0.000000)
min r4.w, r4.z, l(1.000000)
mad r3.w, r3.w, l(255.000000), l(-1.000000)
lt r3.w, |r3.w|, l(0.250000)
if_nz r3.w
  dp3 r3.w, r3.xyzx, r2.xyzx
  dp3 r3.z, r3.xyzx, r6.xyzx
  mul r5.w, r3.w, r3.w
  min r5.w, r5.w, l(1.000000)
  add r5.w, -r5.w, l(1.000000)
  sqrt r5.w, r5.w
  mul r6.w, r3.z, r3.z
  min r6.w, r6.w, l(1.000000)
  add r6.w, -r6.w, l(1.000000)
  sqrt r6.w, r6.w
  sincos r7.x, r8.x, cb12[29].y
  mul r7.x, r5.w, r7.x
  mad r7.x, -r3.w, r8.x, -r7.x
  mad r7.y, -r7.x, r7.x, l(1.000000)
  sqrt r7.y, r7.y
  mul r7.y, r6.w, r7.y
  mad r7.x, r7.x, r3.z, r7.y
  max r7.x, r7.x, l(0.000000)
  log r7.x, r7.x
  mul r7.x, r7.x, cb12[28].w
  exp r7.x, r7.x
  mad_sat r7.x, cb12[28].z, r7.x, r4.z
  min r4.x, r4.x, r7.x
  sincos r7.x, r8.x, cb12[29].x
  mul r5.w, r5.w, r7.x
  mad r3.w, -r3.w, r8.x, -r5.w
  mad r5.w, -r3.w, r3.w, l(1.000000)
  sqrt r5.w, r5.w
  mul r5.w, r6.w, r5.w
  mad r3.z, r3.w, r3.z, r5.w
  max r3.z, r3.z, l(0.000000)
  log r3.z, r3.z
  mul r3.z, r3.z, cb12[28].y
  exp r3.z, r3.z
  mul r3.z, r3.z, cb12[28].x
  mul r7.xyz, r3.zzzz, cb2[2].xyzx
  mul r7.xyz, r4.wwww, r7.xyzx
else 
  mad r3.x, r3.x, l(10.000000), l(1.000000)
  exp r3.x, r3.x
  dp3 r3.z, r6.xyzx, r0.xyzx
  mad r8.xyz, -r0.xyzx, r3.zzzz, r6.xyzx
  mad r9.xyz, -r0.xyzx, r4.yyyy, r2.xyzx
  dp3 r3.w, r8.xyzx, r9.xyzx
  mul r5.w, r1.w, r1.w
  mad r8.xy, r1.wwww, r1.wwww, l(0.570000, 0.090000, 0.000000, 0.000000)
  div r8.xy, r5.wwww, r8.xyxx
  mul r5.w, r8.y, l(0.450000)
  mad r6.w, -r8.x, l(0.500000), l(1.000000)
  mad r7.w, -r3.z, r3.z, l(1.000000)
  mad r8.x, -r4.y, r4.y, l(1.000000)
  mul_sat r7.w, r7.w, r8.x
  sqrt r7.w, r7.w
  max r4.y, r4.y, r3.z
  div r4.y, r7.w, r4.y
  max r3.w, r3.w, l(0.000000)
  mul r3.w, r3.w, r5.w
  mad r3.w, r3.w, r4.y, r6.w
  mul r4.x, r3.w, r4.z
  mad r1.xyz, -r1.xyzx, r2.wwww, r2.xyzx
  dp3 r2.w, r1.xyzx, r1.xyzx
  rsq r2.w, r2.w
  mul r1.xyz, r1.xyzx, r2.wwww
  mov_sat r3.z, r3.z
  dp3_sat r2.w, r6.xyzx, r1.xyzx
  dp3_sat r1.x, r1.xyzx, r0.xyzx
  add r1.y, r3.x, l(2.000000)
  mul r1.y, r1.y, l(0.159154937)
  log r1.z, r1.x
  mul r1.z, r1.z, r3.x
  exp r1.z, r1.z
  mul r1.y, r1.z, r1.y
  max r1.z, r2.w, l(1.192092896E-007)
  min r3.x, r4.w, r3.z
  add r1.x, r1.x, r1.x
  mul r3.w, r1.x, r3.x
  ge r3.w, r1.z, r3.w
  eq r3.x, r3.z, r3.x
  div r4.y, r4.w, r3.z
  movc r3.x, r3.x, l(1.000000), r4.y
  mul r1.x, r1.x, r3.x
  div r1.x, r1.x, r1.z
  div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r3.z
  movc r1.x, r3.w, r1.x, r1.z
  add r1.z, -r2.w, l(1.000000)
  mul r2.w, r1.z, r1.z
  mul r2.w, r2.w, r2.w
  mul r3.x, r1.z, r2.w
  mad r1.z, -r1.z, r2.w, l(1.000000)
  mad r1.z, r1.z, l(0.200000), r3.x
  min r1.z, r1.z, l(1.000000)
  mul r1.x, r1.x, r1.z
  mul r1.x, r1.y, r1.x
  mul r1.x, r1.x, l(0.250000)
  min r1.x, r1.x, l(15.000000)
  mul r1.x, r3.y, r1.x
  mul r1.x, r1.x, l(3.14159274)
  mul r1.xyz, r1.xxxx, cb2[2].xyzx
  mul r7.xyz, r4.wwww, r1.xyzx
endif 
dp3_sat r0.x, r0.xyzx, r6.xyzx
add r0.x, -r0.x, l(1.000000)
log r0.x, r0.x
mul r0.x, r0.x, l(0.010000)
exp r0.x, r0.x
dp3_sat r0.y, r6.xyzx, -r2.xyzx
mul r0.x, r0.y, r0.x
mul r0.x, r4.w, r0.x
mul r0.x, r1.w, r0.x
mul r0.xyz, r0.xxxx, cb2[2].xyzx
mad r0.xyz, cb2[2].xyzx, r4.xxxx, r0.xyzx
mul r0.xyz, r5.xyzx, r0.xyzx
mul r1.xyz, r5.xyzx, r7.xyzx
mul o1.xyz, r0.wwww, r1.xyzx
mul r0.xyz, r0.wwww, r0.xyzx
mov r0.w, l(0)
div o0.xyzw, r0.xyzw, l(3.000000, 3.000000, 3.000000, 3.000000)
mov o1.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
