//
// 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 cb2[3], 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 8
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)
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r0.xyxx, t4.xyzw, s4
ge r1.w, l(0.010000), r0.w
if_nz r1.w
  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 
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

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) 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 r1.w, r4.xyxx, r4.xyxx
  mad r4.zw, -r1.wwww, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
  sqrt r1.w, r4.z
  mul r4.xy, r1.wwww, r4.xyxx
  mov r4.z, -r4.w
  dp3 r1.w, -r3.xyzx, -r3.xyzx
  rsq r1.w, r1.w
  mul r5.xyz, r1.wwww, -r3.xyzx
  dp3 r1.w, r5.xyzx, r4.xyzx
  add r1.w, r1.w, r1.w
  mad r4.xyz, r4.xyzx, -r1.wwww, 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 r1.w, -r1.x, l(1.000000)
  mul r1.w, r1.w, l(6.000000)
  mad r1.w, r3.z, l(0.00195312500), r1.w
  mad r0.z, r0.z, l(255.000000), l(-1.000000)
  round_ni r5.w, r0.z
  sample_l_indexable(texturecubearray)(float,float,float,float) r4.xyz, r5.xyzw, t8.xyzw, s8, r1.w
  dp3 r0.z, r4.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
  mul r1.w, cb12[30].y, l(0.900000)
  add r5.xyz, -r4.xyzx, r0.zzzz
  mad r4.xyz, r1.wwww, r5.xyzx, r4.xyzx
else 
  mov r4.xyz, l(0,0,0,0)
endif 
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, t0.xyzw, s0, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r6.xyz, r0.xyxx, t5.xyzw, s5, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r0.xyxx, t11.xyzw, s11, l(0.000000)
  add r6.xyz, r6.xyzx, r7.xyzx
  mul r6.xyz, r6.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r0.xyxx, t6.xyzw, s6, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t12.xyzw, s12, l(0.000000)
  add r0.xyz, r0.xyzx, r7.xyzx
  add r0.xyz, r2.xyzx, r0.xyzx
  mad r0.xyz, r6.xyzx, r5.xyzx, r0.xyzx
  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.xyz, r1.xxxx, r4.xyzx
  mul r1.xyz, r0.wwww, r1.xyzx
  mad r0.xyz, r1.xyzx, r6.xyzx, r0.xyzx
  mov r3.w, l(1.000000)
  dp4 r0.w, cb12[14].xyzw, r3.xyzw
  add r0.w, r0.w, cb12[35].z
  dp3 r1.x, r3.xyzx, r3.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 r2.xy, r0.wwww, cb12[46].xyxx, -cb12[46].zwzz
  add r0.w, -r2.x, r2.y
  mad r0.w, r1.z, r0.w, r2.x
  lt r1.w, l(0.750000), r1.y
  add r2.x, r1.z, l(-0.750000)
  mul r2.x, r2.x, l(4.000000)
  add r2.y, -cb12[43].w, l(1.000000)
  mad r2.x, r2.x, r2.y, cb12[43].w
  min r2.x, r2.x, l(1.000000)
  movc r1.w, r1.w, r2.x, cb12[43].w
  lt r1.y, r1.y, l(0.015000)
  mul r2.x, r1.z, l(66.666672)
  movc r1.y, r1.y, r2.x, 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 r2.xyz, -cb12[42].xyzx, cb12[44].xyzx
  mad r2.xyz, r1.zzzz, r2.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, -r2.xyzx, r4.xyzx
  mad r2.xyz, r0.wwww, r4.xyzx, r2.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, r3.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, -r2.xxyz, cb2[2].xxyz
  mad r1.xyz, r1.xxxx, r1.yzwy, r2.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 r0.xyz, r0.wwww, r1.xyzx, r0.xyzx
else 
  mov r0.xyz, l(0,0,0,0)
endif 
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
