//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:21:58 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[47], immediateIndexed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb2[3], 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 7
dcl_temps 28

mul r0.xy, v0.xyxx, cb2[0].xyxx
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, r0.xyxx, t3.xywz, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r0.xyxx, t7.yzwx, s7, l(0.000000)
ge r1.w, l(0.010000), r0.w
if_nz r1.w
  mul r2.z, r0.w, 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.w, 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 r0.z, -v0.y, cb2[0].y, l(1.000000)
mad r2.xy, r0.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 r3.x, r3.xyzw, r2.xyzw
dp4 r3.y, r4.xyzw, r2.xyzw
dp4 r3.z, r5.xyzw, r2.xyzw
dp4 r0.z, r6.xyzw, r2.xyzw
div r2.xyz, r3.xyzx, r0.zzzz

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

sample_l_indexable(texture2d)(float,float,float,float) r0.zw, r0.xyxx, t2.xwyz, s2, l(0.000000)
lt r1.w, l(0.00196078443), r0.z
if_nz r1.w
  sample_l_indexable(texture2d)(float,float,float,float) r3.xy, r0.xyxx, t1.xyzw, s1, l(0.000000)
  mad r3.xy, r3.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000), l(-2.000000, -2.000000, 0.000000, 0.000000)
  dp2 r1.w, r3.xyxx, r3.xyxx
  mad r3.zw, -r1.wwww, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
  sqrt r1.w, r3.z
  mul r3.xy, r1.wwww, r3.xyxx
  mov r3.z, -r3.w
  dp3 r1.w, -r2.xyzx, -r2.xyzx
  rsq r1.w, r1.w
  mul r4.xyz, r1.wwww, -r2.xyzx
  dp3 r1.w, r4.xyzx, r3.xyzx
  add r1.w, r1.w, r1.w
  mad r3.xyz, r3.xyzx, -r1.wwww, r4.xyzx
  dp3 r4.x, cb12[12].xyzx, r3.xyzx
  dp3 r4.y, cb12[13].xyzx, r3.xyzx
  dp3 r4.z, cb12[14].xyzx, r3.xyzx
  add r1.w, -r1.x, l(1.000000)
  mul r1.w, r1.w, l(6.000000)
  mad r1.w, r2.z, l(0.00195312500), r1.w
  mad r0.z, r0.z, l(255.000000), l(-1.000000)
  round_ni r4.w, r0.z
  sample_l_indexable(texturecubearray)(float,float,float,float) r3.xyz, r4.xyzw, t8.xyzw, s8, r1.w
  dp3 r0.z, r3.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
  mul r1.w, cb12[30].y, l(0.900000)
  add r4.xyz, -r3.xyzx, r0.zzzz
  mad r3.xyz, r1.wwww, r4.xyzx, r3.xyzx
else 
  mov r3.xyz, l(0,0,0,0)
endif 
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyxx, t14.xyzw, s14
mad r1.zw, r1.zzzz, l(0.000000, 0.000000, 255.000000, 255.000000), l(0.000000, 0.000000, -2.000000, -3.000000)
lt r1.zw, |r1.zzzw|, l(0.000000, 0.000000, 0.250000, 0.250000)
or r0.z, r1.w, r1.z
if_z r0.z
  sample_l_indexable(texture2d)(float,float,float,float) r5.xyz, r0.xyxx, t5.xyzw, s5, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r6.xyz, r0.xyxx, t11.xyzw, s11, l(0.000000)
  add r5.xyz, r5.xyzx, r6.xyzx
  mul r5.xyz, r5.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t10.xyzw, s10, l(0.000000)
  mul r1.y, r1.y, l(3.000000)
  add_sat r1.x, r1.x, l(-0.300000)
  rsq r1.x, r1.x
  div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
  min r1.x, r1.x, l(1.000000)
  mul r1.x, r1.x, r1.y
  mul r0.w, r0.w, r0.w
  mul r0.w, r0.w, l(50.000000)
  mul r1.y, r4.w, cb0[2].z
  min r1.y, r1.y, l(1.000000)
  mad r4.xyz, r4.xyzx, cb0[1].xxxx, -r3.xyzx
  mad r1.yzw, r1.yyyy, r4.xxyz, r3.xxyz
  mul r1.xyz, r1.xxxx, r1.yzwy
  mul r1.xyz, r0.wwww, r1.xyzx
  mad r0.xyz, r1.xyzx, r5.xyzx, r0.xyzx
  mov r2.w, l(1.000000)
  dp4 r0.w, cb12[14].xyzw, r2.xyzw
  add r0.w, r0.w, cb12[35].z
  dp3 r1.x, r2.xyzx, r2.xyzx
  sqrt r1.y, r1.x
  mad r1.y, r1.y, cb12[41].x, -cb12[41].z
  mov_sat r1.z, r1.y
  mad_sat r3.xy, r0.wwww, cb12[46].xyxx, -cb12[46].zwzz
  add r0.w, -r3.x, r3.y
  mad r0.w, r1.z, r0.w, r3.x
  lt r1.w, l(0.750000), r1.y
  add r2.w, r1.z, l(-0.750000)
  mul r2.w, r2.w, l(4.000000)
  add r3.x, -cb12[43].w, l(1.000000)
  mad r2.w, r2.w, r3.x, cb12[43].w
  min r2.w, r2.w, l(1.000000)
  movc r1.w, r1.w, r2.w, cb12[43].w
  lt r1.y, r1.y, l(0.015000)
  mul r2.w, r1.z, l(66.666672)
  movc r1.y, r1.y, r2.w, l(1.000000)
  log r1.z, r1.z
  mul r1.z, r1.z, cb12[42].w
  exp r1.z, r1.z
  min r1.z, r1.w, r1.z
  add r1.w, -r0.w, l(1.000000)
  mad r1.w, r0.w, cb12[44].w, r1.w
  add r3.xyz, -cb12[42].xyzx, cb12[44].xyzx
  mad r3.xyz, r1.zzzz, r3.xyzx, cb12[42].xyzx
  add r4.xyz, -cb12[43].xyzx, cb12[45].xyzx
  mad r4.xyz, r1.zzzz, r4.xyzx, cb12[43].xyzx
  add r4.xyz, -r3.xyzx, r4.xyzx
  mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
  mul r0.w, r1.w, r1.z
  mul r0.w, r1.y, r0.w
  rsq r1.x, r1.x
  mul r1.xyz, r1.xxxx, r2.xyzx
  dp3 r1.x, r1.xyzx, cb2[1].xyzx
  max r1.x, r1.x, l(0.000000)
  log r1.x, r1.x
  mul r1.x, r1.x, cb2[2].w
  exp r1.x, r1.x
  mul r1.x, r1.x, cb2[1].w
  add r1.yzw, -r3.xxyz, cb2[2].xxyz
  mad r1.xyz, r1.xxxx, r1.yzwy, r3.xyzx
  lt r1.w, r0.w, cb12[43].w
  dp3 r2.x, r0.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
  add r2.yzw, -r1.xxyz, r2.xxxx
  mad r2.xyz, r2.xxxx, r2.yzwy, r1.xyzx
  movc r1.xyz, r1.wwww, r2.xyzx, r1.xyzx
  add r1.xyz, -r0.xyzx, r1.xyzx
  mad o0.xyz, r0.wwww, r1.xyzx, r0.xyzx
  mov o0.w, l(1.000000)
else 
  mov o0.xyzw, l(0,0,0,0)
endif 
ret 
// Approximately 0 instruction slots used
