//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:21:55 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 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 s10, mode_default
dcl_sampler s14, mode_default
dcl_sampler s15, 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) 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) t10
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 13
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) r2.xyz, r0.xyxx, t5.xyzw, s5, l(0.000000)
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)
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyxx, t4.xyzw, s4
ge r1.w, l(0.010000), r0.w
if_nz r1.w
  mul r4.z, r0.w, l(100.000000)
  mov r5.xyzw, cb12[24].xyzw
  mov r6.xyzw, cb12[25].xyzw
  mov r7.xyzw, cb12[26].xyzw
  mov r8.xyzw, cb12[27].xyzw
else 
  mad r4.z, r0.w, l(1.010000), l(-0.010000)
  mov r5.xyzw, cb12[20].xyzw
  mov r6.xyzw, cb12[21].xyzw
  mov r7.xyzw, cb12[22].xyzw
  mov r8.xyzw, cb12[23].xyzw
endif 
sample_l_indexable(texture2d)(float,float,float,float) r9.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) r10.xy, r0.xyxx, t2.yzxw, s2, l(0.000000)
mul r1.y, r10.y, r10.y
mul r1.y, r1.y, l(50.000000)
lt r2.w, l(0.00196078443), r10.x
if_nz r2.w
  sample_l_indexable(texture2d)(float,float,float,float) r10.yz, r0.xyxx, t1.zxyw, s1, l(0.000000)
  mad r10.yz, r10.yyzy, l(0.000000, 4.000000, 4.000000, 0.000000), l(0.000000, -2.000000, -2.000000, 0.000000)
  dp2 r2.w, r10.yzyy, r10.yzyy
  mad r11.xy, -r2.wwww, l(0.250000, 0.500000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
  sqrt r2.w, r11.x
  mul r12.xy, r2.wwww, r10.yzyy
  mov r12.z, -r11.y
  mad r0.z, -v0.y, cb2[0].y, l(1.000000)
  mad r4.xy, r0.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
  mov r4.w, l(1.000000)
  dp4 r5.x, r5.xyzw, r4.xyzw
  dp4 r5.y, r6.xyzw, r4.xyzw
  dp4 r5.z, r7.xyzw, r4.xyzw
  dp4 r0.z, r8.xyzw, r4.xyzw
  div r4.xyz, r5.xyzx, r0.zzzz
  
ld_indexable(texture2d)(float,float,float,float) r28.xyzw, l(0, 0, 0, 0), t125.xyzw
add r28.w, r4.z, -r28.y
mul r28.w, r28.w, r28.x
mul r28.w, r28.w, cb12[20].x
add r4.x, r4.x, -r28.w

  dp3 r0.z, -r4.xyzx, -r4.xyzx
  rsq r0.z, r0.z
  mul r4.xyw, r0.zzzz, -r4.xyxz
  dp3 r0.z, r4.xywx, r12.xyzx
  add r0.z, r0.z, r0.z
  mad r4.xyw, r12.xyxz, -r0.zzzz, r4.xyxw
  dp3 r5.x, cb12[12].xyzx, r4.xywx
  dp3 r5.y, cb12[13].xyzx, r4.xywx
  dp3 r5.z, cb12[14].xyzx, r4.xywx
  add r0.z, -r1.x, l(1.000000)
  mul r0.z, r0.z, l(6.000000)
  mad r0.z, r4.z, l(0.00195312500), r0.z
  mad r1.x, r10.x, l(255.000000), l(-1.000000)
  round_ni r5.w, r1.x
  sample_l_indexable(texturecubearray)(float,float,float,float) r4.xyz, r5.xyzw, t8.xyzw, s8, r0.z
  dp3 r0.z, r4.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
  mul r1.x, cb12[30].y, l(0.900000)
  add r5.xyz, -r4.xyzx, r0.zzzz
  mad r4.xyz, r1.xxxx, r5.xyzx, r4.xyzx
else 
  mov r4.xyz, l(0,0,0,0)
endif 
sample_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.xyxx, t14.xyzw, s14
mul r0.z, r5.w, cb0[2].z
min r0.z, r0.z, l(1.000000)
mad r5.xyz, r5.xyzx, cb0[1].xxxx, -r4.xyzx
mad r4.xyz, r0.zzzz, r5.xyzx, r4.xyzx
mad r0.z, r1.z, l(255.000000), l(-5.000000)
lt r0.z, |r0.z|, l(0.250000)
if_nz r0.z
  and r0.z, r1.w, l(0x3f800000)
  mad r0.z, r0.z, cb0[0].z, l(1.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r1.x, r0.xyxx, t15.xyzw, s15, l(0.000000)
  mul r1.x, r0.z, r1.x
  mul r1.zw, cb0[0].xxxx, l(0.000000, 0.000000, 0.078125, 0.138890)
  div r1.zw, r1.zzzw, r1.xxxx
  mad r5.xyzw, r1.zwzw, l(-2.000000, -2.000000, -1.280000, -1.280000), r0.xyxy
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r6.xyz, r5.xyxx, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r7.xyz, -r6.xyzx, r9.xyzx
    mad r6.xyz, r2.wwww, r7.xyzx, r6.xyzx
  else 
    mov r6.xyz, r9.xyzx
  endif 
  mul r6.xyz, r6.xyzx, l(0.00471690996, 0.000184770994, 0.0000507566001, 0.000000)
  mad r6.xyz, r9.xyzx, l(0.560479, 0.669086, 0.784728, 0.000000), r6.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.zwzz, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r5.zwzz, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.zwzz, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r5.xyz, -r7.xyzx, r9.xyzx
    mad r5.xyz, r2.wwww, r5.xyzx, r7.xyzx
  else 
    mov r5.xyz, r9.xyzx
  endif 
  mad r5.xyz, r5.xyzx, l(0.0192830991, 0.00282018003, 0.000842139998, 0.000000), r6.xyzx
  mad r6.xyzw, r1.zwzw, l(-0.720000, -0.720000, -0.320000, -0.320000), r0.xyxy
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.xyxx, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r8.xyz, -r7.xyzx, r9.xyzx
    mad r7.xyz, r2.wwww, r8.xyzx, r7.xyzx
  else 
    mov r7.xyz, r9.xyzx
  endif 
  mad r5.xyz, r7.xyzx, l(0.036390, 0.0130999004, 0.00643684994, 0.000000), r5.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.zwzz, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r6.xyz, -r7.xyzx, r9.xyzx
    mad r6.xyz, r2.wwww, r6.xyzx, r7.xyzx
  else 
    mov r6.xyz, r9.xyzx
  endif 
  mad r5.xyz, r6.xyzx, l(0.0821904019, 0.0358607993, 0.0209260993, 0.000000), r5.xyzx
  mad r6.xyzw, r1.zwzw, l(-0.080000, -0.080000, 0.080000, 0.080000), r0.xyxy
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.xyxx, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r8.xyz, -r7.xyzx, r9.xyzx
    mad r7.xyz, r2.wwww, r8.xyzx, r7.xyzx
  else 
    mov r7.xyz, r9.xyzx
  endif 
  mad r5.xyz, r7.xyzx, l(0.0771801993, 0.113491, 0.0793803036, 0.000000), r5.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.zwzz, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r6.xyz, -r7.xyzx, r9.xyzx
    mad r6.xyz, r2.wwww, r6.xyzx, r7.xyzx
  else 
    mov r6.xyz, r9.xyzx
  endif 
  mad r5.xyz, r6.xyzx, l(0.0771801993, 0.113491, 0.0793803036, 0.000000), r5.xyzx
  mad r6.xyzw, r1.zwzw, l(0.320000, 0.320000, 0.720000, 0.720000), r0.xyxy
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.xyxx, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r8.xyz, -r7.xyzx, r9.xyzx
    mad r7.xyz, r2.wwww, r8.xyzx, r7.xyzx
  else 
    mov r7.xyz, r9.xyzx
  endif 
  mad r5.xyz, r7.xyzx, l(0.0821904019, 0.0358607993, 0.0209260993, 0.000000), r5.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.zwzz, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r6.xyz, -r7.xyzx, r9.xyzx
    mad r6.xyz, r2.wwww, r6.xyzx, r7.xyzx
  else 
    mov r6.xyz, r9.xyzx
  endif 
  mad r5.xyz, r6.xyzx, l(0.036390, 0.0130999004, 0.00643684994, 0.000000), r5.xyzx
  mad r6.xy, r1.zwzz, l(1.280000, 1.280000, 0.000000, 0.000000), r0.xyxx
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.xyxx, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t15.yzwx, s15, l(0.000000)
    mul r3.w, cb0[0].y, l(0.100000)
    mad r2.w, -r2.w, r0.z, r1.x
    mul r2.w, |r2.w|, r3.w
    min r2.w, r2.w, l(1.000000)
    add r6.xyz, -r7.xyzx, r9.xyzx
    mad r6.xyz, r2.wwww, r6.xyzx, r7.xyzx
  else 
    mov r6.xyz, r9.xyzx
  endif 
  mad r5.xyz, r6.xyzx, l(0.0192830991, 0.00282018003, 0.000842139998, 0.000000), r5.xyzx
  mad r1.zw, r1.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), r0.xxxy
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r1.zwzz, t3.xyzw, s3, l(0.000000)
  mad r2.w, r2.w, l(255.000000), l(-5.000000)
  lt r2.w, |r2.w|, l(0.250000)
  if_nz r2.w
    sample_l_indexable(texture2d)(float,float,float,float) r6.xyz, r1.zwzz, t10.xyzw, s10, l(0.000000)
    sample_l_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t15.yzxw, s15, l(0.000000)
    mul r1.w, cb0[0].y, l(0.100000)
    mad r0.z, -r1.z, r0.z, r1.x
    mul r0.z, |r0.z|, r1.w
    min r0.z, r0.z, l(1.000000)
    add r1.xzw, -r6.xxyz, r9.xxyz
    mad r9.xyz, r0.zzzz, r1.xzwx, r6.xyzx
  endif 
  mad r1.xzw, r9.xxyz, l(0.00471690996, 0.000000, 0.000184770994, 0.0000507564982), r5.xxyz
  sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t6.xyzw, s6, l(0.000000)
  add r0.xyz, r3.xyzx, r0.xyzx
  add r9.xyz, r0.xyzx, r1.xzwx
endif 
mul r0.xyz, r0.wwww, r4.xyzx
mul r0.xyz, r1.yyyy, r0.xyzx
mad o0.xyz, r0.xyzx, r2.xyzx, r9.xyzx
mov o0.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
