//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:21:54 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
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[31], immediateIndexed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb2[1], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s5, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_sampler s14, mode_default
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_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texturecubearray (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 10
dcl_temps 28

mul r0.xy, v0.xyxx, cb2[0].xyxx
sample_l_indexable(texture2d)(float,float,float,float) r1.xy, r0.xyxx, t3.xyzw, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r2.xyz, r0.xyxx, t5.xyzw, s5, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyxx, t11.xyzw, s11, l(0.000000)
add r2.xyz, r2.xyzx, r3.xyzx
mul r2.xyz, r2.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r0.xyxx, t7.yzwx, s7, l(0.000000)
ge r1.z, l(0.010000), r0.w
if_nz r1.z
  mul r3.z, r0.w, l(100.000000)
  mov r4.xyzw, cb12[24].xyzw
  mov r5.xyzw, cb12[25].xyzw
  mov r6.xyzw, cb12[26].xyzw
  mov r7.xyzw, cb12[27].xyzw
else 
  mad r3.z, r0.w, l(1.010000), l(-0.010000)
  mov r4.xyzw, cb12[20].xyzw
  mov r5.xyzw, cb12[21].xyzw
  mov r6.xyzw, cb12[22].xyzw
  mov r7.xyzw, cb12[23].xyzw
endif 
sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r0.xyxx, t10.xyzw, s10, l(0.000000)
mul r0.w, r1.y, l(3.000000)
add_sat r1.y, r1.x, l(-0.300000)
rsq r1.y, r1.y
div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.y



min r1.y, r1.y, l(1.000000)
mul r0.w, r0.w, r1.y
sample_l_indexable(texture2d)(float,float,float,float) r1.yz, r0.xyxx, t2.xyzw, s2, l(0.000000)
mul r1.z, r1.z, r1.z
mul r1.z, r1.z, l(50.000000)
lt r1.w, l(0.00196078443), r1.y
if_nz r1.w
  sample_l_indexable(texture2d)(float,float,float,float) r9.xy, r0.xyxx, t1.xyzw, s1, l(0.000000)
  mad r9.xy, r9.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000), l(-2.000000, -2.000000, 0.000000, 0.000000)
  dp2 r1.w, r9.xyxx, r9.xyxx
  mad r9.zw, -r1.wwww, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
  sqrt r1.w, r9.z
  mul r9.xy, r1.wwww, r9.xyxx
  mov r9.z, -r9.w
  mad r0.z, -v0.y, cb2[0].y, l(1.000000)
  mad r3.xy, r0.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
  mov r3.w, l(1.000000)
  dp4 r4.x, r4.xyzw, r3.xyzw
  dp4 r4.y, r5.xyzw, r3.xyzw
  dp4 r4.z, r6.xyzw, r3.xyzw
  dp4 r0.z, r7.xyzw, r3.xyzw
  div r3.xyz, r4.xyzx, r0.zzzz
  
ld_indexable(texture2d)(float,float,float,float) r28.xyzw, l(0, 0, 0, 0), t125.xyzw
add r28.w, r3.z, -r28.y
mul r28.w, r28.w, r28.x
mul r28.w, r28.w, cb12[20].x
add r3.x, r3.x, -r28.w

  dp3 r0.z, -r3.xyzx, -r3.xyzx
  rsq r0.z, r0.z
  mul r3.xyw, r0.zzzz, -r3.xyxz
  dp3 r0.z, r3.xywx, r9.xyzx
  add r0.z, r0.z, r0.z
  mad r3.xyw, r9.xyxz, -r0.zzzz, r3.xyxw
  dp3 r4.x, cb12[12].xyzx, r3.xywx
  dp3 r4.y, cb12[13].xyzx, r3.xywx
  dp3 r4.z, cb12[14].xyzx, r3.xywx
  add r0.z, -r1.x, l(1.000000)
  mul r0.z, r0.z, l(6.000000)
  mad r0.z, r3.z, l(0.00195312500), r0.z
  mad r1.x, r1.y, l(255.000000), l(-1.000000)
  round_ni r4.w, r1.x
  sample_l_indexable(texturecubearray)(float,float,float,float) r1.xyw, r4.xyzw, t8.xywz, s8, r0.z
  dp3 r0.z, r1.xywx, l(0.299000, 0.587000, 0.114000, 0.000000)
  mul r2.w, cb12[30].y, l(0.900000)
  add r3.xyz, -r1.xywx, r0.zzzz
  mad r1.xyw, r2.wwww, r3.xyxz, r1.xyxw
else 
  mov r1.xyw, l(0,0,0,0)
endif 
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t14.xyzw, s14
mul r0.x, r3.w, cb0[2].z
min r0.x, r0.x, l(1.000000)
mad r3.xyz, r3.xyzx, cb0[1].xxxx, -r1.xywx
mad r0.xyz, r0.xxxx, r3.xyzx, r1.xywx
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.xyz, r1.zzzz, r0.xyzx
mad o0.xyz, r0.xyzx, r2.xyzx, r8.xyzx
mov o0.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
