//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.7 on Thu Nov 12 18:20:21 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 4   xyzw        2     NONE   float       
// TEXCOORD                 1   xyzw        3     NONE   float   xyzw
// TEXCOORD                 2   xyzw        4     NONE   float   xy  
// TEXCOORD                 5   xyz         5     NONE   float   xyz 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyz         0   TARGET   float   xyz 
// SV_Target                1   xyzw        1   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[28], immediateIndexed
dcl_constantbuffer cb0[7], immediateIndexed
dcl_constantbuffer cb1[12], immediateIndexed
dcl_constantbuffer cb2[5], immediateIndexed
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
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_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xy
dcl_input_ps linear v5.xyz
dcl_output o0.xyz
dcl_output o1.xyzw
//dcl_temps 7
dcl_temps 28

dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v1.xyzx
add r0.w, v1.w, l(-8192.000000)
add r1.x, cb1[10].x, l(-8192.000000)
div_sat r0.w, r0.w, r1.x

mul r1.xy, v0.xyxx, cb0[0].xyxx
resinfo_indexable(texture2d)(float,float,float,float) r1.zw, l(0), t11.zwxy
mul r1.zw, r1.zzzw, r1.xxxy
round_ni r1.zw, r1.zzzw
ftou r2.xy, r1.zwzz
add r3.xyzw, r1.zwzw, l(0.000000, 1.000000, 1.000000, 0.000000)
ftou r3.xyzw, r3.zwxy
add r1.zw, r1.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
ftou r4.xy, r1.zwzz
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.z, r2.xyzw, t11.xywz
mov r2.xy, r3.zwzz
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.w, r2.xyzw, t11.xyzw
mov r3.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r2.x, r3.xyzw, t11.wxyz
mov r4.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r2.y, r4.xyzw, t11.xwyz
mad r1.z, r1.z, l(255.000000), l(-3.000000)
mad r1.w, r1.w, l(255.000000), l(-3.000000)
lt r1.zw, |r1.zzzw|, l(0.000000, 0.000000, 0.250000, 0.250000)
mad r2.x, r2.x, l(255.000000), l(-3.000000)
mad r2.y, r2.y, l(255.000000), l(-3.000000)
lt r2.xy, |r2.xyxx|, l(0.250000, 0.250000, 0.000000, 0.000000)
and r1.z, r1.w, r1.z
and r1.z, r2.x, r1.z
and r1.z, r2.y, r1.z
discard_nz r1.z
sample_indexable(texture2d)(float,float,float,float) r1.z, r1.xyxx, t7.yzxw, s7
ge r1.w, l(0.010000), r1.z
if_nz r1.w
  mul r2.z, r1.z, 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, r1.z, 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 
mul r1.x, r1.x, cb0[0].z
mad r1.z, -r1.y, cb0[0].w, l(1.000000)
mad r2.xy, r1.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 r1.x, r3.xyzw, r2.xyzw
dp4 r1.y, r4.xyzw, r2.xyzw
dp4 r1.z, r5.xyzw, r2.xyzw
dp4 r1.w, r6.xyzw, r2.xyzw
div r1.xyz, r1.xyzx, r1.wwww

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

dp3 r1.x, r1.xyzx, r1.xyzx
sqrt r1.x, r1.x
mul r0.xyz, -r0.xyzx, r1.xxxx
dp3 r0.x, r0.xyzx, cb2[4].xyzx
div r0.y, cb2[4].w, r0.x
add r0.y, -r0.y, l(1.000000)
mul r0.x, |r0.x|, r0.y
div r0.x, r0.x, cb1[10].w
add_sat r0.x, -r0.x, l(1.000000)
add r0.y, -cb1[11].w, cb1[11].z
add r0.x, r0.x, -cb1[11].w
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
mul_sat r0.x, r0.y, r0.x
mad r0.y, r0.x, l(-2.000000), l(3.000000)
mul r0.x, r0.x, r0.x
mad r0.x, -r0.y, r0.x, l(1.000000)
mul r0.x, r0.x, cb1[11].y
mul r0.x, r0.x, l(0.500000)
sample_indexable(texture2d)(float,float,float,float) r0.yz, v3.xyxx, t4.zxyw, s4
add r1.xy, r0.yzyy, r0.yzyy
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
dp2 r0.y, r0.yzyy, r0.yzyy
min r0.y, r0.y, l(1.000000)
add r0.y, -r0.y, l(1.000000)
sqrt r1.z, r0.y
add r1.xyz, r1.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r1.xyz, cb1[9].xxxx, r1.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.yz, v3.zwzz, t5.zxyw, s5
mad r2.xy, r0.yzyy, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.y, r2.xyxx, r2.xyxx
min r0.y, r0.y, l(1.000000)
add r0.y, -r0.y, l(1.000000)
sqrt r2.z, r0.y
sample_indexable(texture2d)(float,float,float,float) r0.yz, v4.xyxx, t6.zxyw, s6
mad r3.xy, r0.yzyy, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.y, r3.xyxx, r3.xyxx
min r0.y, r0.y, l(1.000000)
add r0.y, -r0.y, l(1.000000)
sqrt r3.z, r0.y
mul r2.xyz, r2.xyzx, cb1[9].yyyy
mul r3.xyz, r3.xyzx, cb1[9].zzzz
mad r1.xyz, r2.xyzx, r0.wwww, r1.xyzx
mad r0.yzw, r3.xxyz, r0.wwww, r1.xxyz
dp3 r1.x, r0.yzwy, r0.yzwy
rsq r1.x, r1.x
mad r0.yzw, r0.yyzw, r1.xxxx, l(0.000000, -0.000000, -0.000000, -1.000000)
mad r0.xyz, r0.xxxx, r0.yzwy, l(0.000000, 0.000000, 1.000000, 0.000000)
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r1.x, -v5.xyzx, -v5.xyzx
rsq r1.x, r1.x
mul r1.xyz, r1.xxxx, -v5.xyzx
mov r0.w, l(1.000000)
dp4 r2.x, cb12[0].xyzw, r0.xyzw
dp4 r2.y, cb12[1].xyzw, r0.xyzw
dp4 r2.z, cb12[2].xyzw, r0.xyzw
dp3 r0.x, -r1.xyzx, r2.xyzx
add r0.x, r0.x, r0.x
mad r0.xyz, r2.xyzx, -r0.xxxx, -r1.xyzx
mov r1.xyz, v5.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, cb12[4].xyzw, r1.xyzw
dp4 r2.y, cb12[5].xyzw, r1.xyzw
dp4 r2.z, cb12[6].xyzw, r1.xyzw
dp4 r0.w, cb12[7].xyzw, r1.xyzw
div r1.xyz, r2.xyzx, r0.wwww
lt r0.w, cb0[6].y, r0.z
mad r2.xyz, r0.xyzx, l(1000.000000, 1000.000000, 1000.000000, 0.000000), v5.xyzx
mov r2.w, l(1.000000)
dp4 r0.x, cb12[4].xyzw, r2.xyzw
dp4 r0.y, cb12[5].xyzw, r2.xyzw
dp4 r0.z, cb12[6].xyzw, r2.xyzw
dp4 r1.w, cb12[7].xyzw, r2.xyzw
div r0.xyz, r0.xyzx, r1.wwww
mad r2.xy, r0.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r1.xyz, r1.xyzx, l(0.500000, -0.500000, 1.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r3.xyz, r0.xyzx, l(0.500000, -0.500000, 1.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
add r1.xyz, -r1.xyzx, r3.xyzx
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
mul r0.xy, r0.xxxx, r1.xyxx
mad r0.xy, -r0.zzzz, r0.xyxx, r2.xyxx
mov r0.z, v5.z
and r0.xyz, r0.xyzx, r0.wwww
mov o1.xyzw, r0.zzzz
mov o0.xyz, r0.xyzx
ret 
// Approximately 0 instruction slots used
