// Shadows
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.65 on Sun Sep 24 12:05:28 2017
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float       
// TEXCOORD                11   xyzw        1     NONE   float       
// SV_Position              0   xyzw        2      POS   float   xyzw
// SV_IsFrontFace           0   x           3    FFACE    uint       
//
//
// 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 cb0[125], immediateIndexed
dcl_constantbuffer cb1[10], immediateIndexed
dcl_constantbuffer cb2[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps_siv linear noperspective v2.xyzw, position
dcl_output o0.xyzw
//dcl_temps 4

dcl_temps 25

// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw

add r0.xy, v2.xyxx, -cb0[116].xyxx
mad r0.xy, r0.xyxx, cb0[117].zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r0.xy, r0.xyxx, v2.wwww
mov r0.z, v2.w
mul r0.xyz, r0.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r0.xy, r0.xyxx, r0.zzzz
mul r0.zw, r0.xxxy, cb0[54].xxxy
mad r0.xy, r0.xyxx, cb0[54].xyxx, cb0[54].wzww
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.xyzw, s0, l(0.000000)
mad r0.y, r0.x, cb0[53].x, cb0[53].y
mad r0.x, r0.x, cb0[53].z, -cb0[53].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
add r0.x, r0.x, r0.y
div r0.yz, r0.zzwz, cb0[54].xxyx
mul r0.yz, r0.xxxx, r0.yyzy

//Fix
  add r25.w, r0.x, -r25.y
  mul r25.w, r25.x, r25.w
  add r0.y, r0.y, -r25.w

mul r1.xyzw, r0.zzzz, cb0[41].xyzw
mad r1.xyzw, r0.yyyy, cb0[40].xyzw, r1.xyzw
mad r0.xyzw, r0.xxxx, cb0[42].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[43].xyzw
div r0.xyz, r0.xyzx, r0.wwww
add r1.xyz, -r0.xyzx, cb0[55].xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
mul r1.xy, r0.wwww, l(0.000400, 0.00333333341, 0.000000, 0.000000)
min r0.w, r1.x, l(1.000000)
max r1.x, r1.y, l(0.000001)
mul r1.x, r1.x, r1.x
min r1.x, r1.x, l(1.000000)
mul r0.w, r0.w, r1.x
add r1.xyz, cb1[8].xyzx, -cb1[9].xyzx
add r2.xyz, r0.xyzx, -r1.xyzx
lt r2.xyz, l(0.000010, 0.000010, 0.000010, 0.000000), |r2.xyzx|
ge r1.xyz, r0.xyzx, r1.xyzx
and r1.xyz, r2.xyzx, r1.xyzx
and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mul r1.x, r1.y, r1.x
mul r1.x, r1.z, r1.x
add r1.yzw, cb1[8].xxyz, cb1[9].xxyz
add r2.xyz, r0.xyzx, -r1.yzwy
lt r2.xyz, l(0.000010, 0.000010, 0.000010, 0.000000), |r2.xyzx|
ge r1.yzw, r0.xxyz, r1.yyzw
movc r1.yzw, r1.yyzw, l(0,0,0,0), l(0,1.000000,1.000000,1.000000)
and r1.yzw, r1.yyzw, r2.xxyz
mul r1.y, r1.z, r1.y
mul r1.y, r1.w, r1.y
mul r1.x, r1.y, r1.x
add r0.xyz, r0.xyzx, -cb1[8].xyzx
mul r1.yzw, r0.yyyy, cb1[5].xxyz
mad r1.yzw, r0.xxxx, cb1[4].xxyz, r1.yyzw
mad r0.xyz, r0.zzzz, cb1[6].xyzx, r1.yzwy
dp3 r1.y, cb1[0].xyzx, cb1[0].xyzx
sqrt r1.y, r1.y
mul r0.xyz, r0.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
max r0.xyz, |r0.xyzx|, l(0.000001, 0.000001, 0.000001, 0.000000)
log r0.xyz, r0.xyzx
mul r0.x, r0.x, r1.y
exp r0.x, r0.x
max r0.x, r0.x, l(0.000001)
log r0.x, r0.x
mul r0.x, r0.x, cb2[4].y
exp r0.x, r0.x
min r0.x, r0.x, l(1.000000)
dp3 r1.y, cb1[1].xyzx, cb1[1].xyzx
sqrt r1.y, r1.y
mul r0.y, r0.y, r1.y
exp r0.y, r0.y
max r0.y, r0.y, l(0.000001)
log r0.y, r0.y
mul r0.y, r0.y, cb2[4].y
exp r0.y, r0.y
min r0.y, r0.y, l(1.000000)
add r0.xy, -r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r0.x, r0.y, r0.x
dp3 r0.y, cb1[2].xyzx, cb1[2].xyzx
sqrt r0.y, r0.y
mul r0.y, r0.z, r0.y
exp r0.y, r0.y
max r0.y, r0.y, l(0.000001)
log r0.y, r0.y
mul r0.y, r0.y, l(20.000000)
exp r0.y, r0.y
min r0.y, r0.y, l(1.000000)
add r0.y, -r0.y, l(1.000000)
mul r0.x, r0.y, r0.x
mul r0.x, r0.x, r1.x
mad r0.x, r0.x, -r0.w, l(1.000000)
add r0.xyz, r0.xxxx, cb2[1].xyzx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r0.w, l(0.000000), cb0[124].x
if_nz r0.w
  mul r1.xyzw, v2.yyyy, cb0[37].xyzw
  mad r1.xyzw, v2.xxxx, cb0[36].xyzw, r1.xyzw
  mad r1.xyzw, v2.zzzz, cb0[38].xyzw, r1.xyzw
  add r1.xyzw, r1.xyzw, cb0[39].xyzw
  div r1.xyz, r1.xyzx, r1.wwww
  add r1.xyz, r1.xyzx, -cb0[58].xyzx
  add r2.xyz, r1.xyzx, -cb1[8].xyzx
  add r3.xyz, cb1[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r2.xyz, r3.xyzx, |r2.xyzx|
  or r0.w, r2.y, r2.x
  or r0.w, r2.z, r0.w
  dp3 r1.x, r1.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.x, r1.x, l(0.002000)
  frc r1.x, r1.x
  lt r1.x, l(0.500000), r1.x
  movc r1.xyz, r1.xxxx, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r0.xyz, r0.wwww, r1.xyzx, r0.xyzx
endif 
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret 
// Approximately 0 instruction slots used
