//
// 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  
// TEXCOORD                 0   xyz         1     NONE   float       
//
//
// 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 cb2[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s11, mode_default
dcl_sampler s12, 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_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texturecubearray (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 12
dcl_temps 28

mul r0.xy, v0.xyxx, cb2[0].xyxx
sample_l_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.xyxx, t0.xyzw, s0, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r2.xy, r0.xyxx, t3.xyzw, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyxx, t5.xyzw, s5, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r4.xyz, r0.xyxx, t11.xyzw, s11, l(0.000000)
add r3.xyz, r3.xyzx, r4.xyzx
mul r3.xyz, r3.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)
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r0.xyxx, t4.xyzw, s4
ge r2.z, l(0.010000), r0.w
if_nz r2.z
  mul r5.z, r0.w, l(100.000000)
  mov r6.xyzw, cb12[24].xyzw
  mov r7.xyzw, cb12[25].xyzw
  mov r8.xyzw, cb12[26].xyzw
  mov r9.xyzw, cb12[27].xyzw
else 
  mad r5.z, r0.w, l(1.010000), l(-0.010000)
  mov r6.xyzw, cb12[20].xyzw
  mov r7.xyzw, cb12[21].xyzw
  mov r8.xyzw, cb12[22].xyzw
  mov r9.xyzw, cb12[23].xyzw
endif 
sample_l_indexable(texture2d)(float,float,float,float) r10.xyz, r0.xyxx, t6.xyzw, s6, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r11.xyz, r0.xyxx, t12.xyzw, s12, l(0.000000)
add r10.xyz, r10.xyzx, r11.xyzx
add r4.xyz, r4.xyzx, r10.xyzx
mad r1.xyz, r3.xyzx, r1.xyzx, r4.xyzx
mul r0.w, r2.y, l(3.000000)
add_sat r2.y, r2.x, l(-0.300000)
rsq r2.y, r2.y
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y



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

  dp3 r2.w, -r0.xyzx, -r0.xyzx
  rsq r2.w, r2.w
  mul r5.xyz, -r0.xyzx, r2.wwww
  dp3 r0.x, r5.xyzx, r4.xyzx
  add r0.x, r0.x, r0.x
  mad r4.xyz, r4.xyzx, -r0.xxxx, r5.xyzx
  dp3 r5.x, cb12[12].xyzx, r4.xyzx
  dp3 r5.y, cb12[13].xyzx, r4.xyzx
  dp3 r5.z, cb12[14].xyzx, r4.xyzx
  add r0.x, -r2.x, l(1.000000)
  mul r0.x, r0.x, l(6.000000)
  mad r0.x, r0.z, l(0.00195312500), r0.x
  mad r0.y, r2.y, l(255.000000), l(-1.000000)
  round_ni r5.w, r0.y
  sample_l_indexable(texturecubearray)(float,float,float,float) r0.xyz, r5.xyzw, t8.xyzw, s8, r0.x
  dp3 r2.x, r0.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
  mul r2.y, cb12[30].y, l(0.900000)
  add r4.xyz, -r0.xyzx, r2.xxxx
  mad r0.xyz, r2.yyyy, r4.xyzx, r0.xyzx
else 
  mov r0.xyz, l(0,0,0,0)
endif 
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.xyz, r2.zzzz, r0.xyzx
mad o0.xyz, r0.xyzx, r3.xyzx, r1.xyzx
mov o0.w, r1.w
ret 
// Approximately 0 instruction slots used
