// Shadows
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.65 on Wed Sep 20 20:52:26 2017
//
//
// 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 cb0[36], dynamicIndexed
dcl_constantbuffer cb1[119], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 7
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

mul r0.xy, v0.xyxx, cb1[118].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.xyzw, s0, l(0.000000)
mad r0.y, r0.x, cb1[53].x, cb1[53].y
mad r0.x, r0.x, cb1[53].z, -cb1[53].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
add r0.x, r0.x, r0.y
mad r0.yz, v0.xxyx, cb1[118].zzwz, -cb1[54].wwzw
div r0.yz, r0.yyzy, cb1[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, cb1[41].xyzw
mad r1.xyzw, r0.yyyy, cb1[40].xyzw, r1.xyzw
mad r0.xyzw, r0.xxxx, cb1[42].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb1[43].xyzw
div r0.xyz, r0.xyzx, r0.wwww
add r1.xyz, -r0.xyzx, cb0[34].xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
mul r1.w, r0.w, cb0[34].w
lt r1.w, r1.w, l(1.000000)
if_nz r1.w
  div r2.xyz, r1.xyzx, r0.wwww
  mul r3.xyz, r2.yzxy, l(0.000000, 0.000000, 1.000000, 0.000000)
  mad r3.xyz, r2.xyzx, l(0.000000, 1.000000, 0.000000, 0.000000), -r3.xyzx
  dp2 r0.w, r3.yzyy, r3.yzyy
  rsq r0.w, r0.w
  mul r3.xyz, r0.wwww, r3.xyzx
  mul r4.xyz, r2.yzxy, r3.xyzx
  mad r4.xyz, r3.zxyz, r2.zxyz, -r4.xyzx
  mul r3.xy, r3.yzyy, cb0[26].xxxx
  mul r4.xyz, r4.xyzx, cb0[26].xxxx
  max r0.w, |r1.z|, |r1.y|
  max r0.w, r0.w, |r1.x|
  eq r5.xyz, r1.xyzx, |r1.xyzx|
  eq r1.xy, |r1.xyxx|, r0.wwww
  movc r5.xyz, r5.xyzx, l(0,2,4,0), l(1,3,5,0)
  movc r0.w, r1.y, r5.y, r5.z
  movc r0.w, r1.x, r5.x, r0.w
  ishl r0.w, r0.w, l(2)
  mul r1.xy, r0.yyyy, cb0[r0.w + 3].zwzz
  mad r0.xy, r0.xxxx, cb0[r0.w + 2].zwzz, r1.xyxx
  mad r0.xy, r0.zzzz, cb0[r0.w + 4].zwzz, r0.xyxx
  add r0.xy, r0.xyxx, cb0[r0.w + 5].zwzz
  div r0.x, r0.x, r0.y
  div r0.y, -cb0[35].x, r0.y
  mad r1.xyz, r4.xyzx, l(2.500000, 2.500000, 2.500000, 0.000000), r2.xyzx
  mad r5.xyzw, r0.yyyy, l(2.500000, 1.08132124, 1.087495, 1.08946109), r0.xxxx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.z, r1.xyzx, t1.xxxx, s1, r5.x
  mul r1.xy, r3.xyxx, l(1.767767, 1.767767, 0.000000, 0.000000)
  mov r1.z, l(0)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r6.xyz, r4.xyzx, l(1.767767, 1.767767, 1.767767, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r6.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mul r6.xy, r3.xyxx, l(2.500000, 2.500000, 0.000000, 0.000000)
  mov r6.z, l(0)
  add r6.xyz, r2.xyzx, r6.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r6.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mad r1.xyz, r4.xyzx, l(-1.767767, -1.767767, -1.767767, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mad r1.xyz, r4.xyzx, l(-2.500000, -2.500000, -2.500000, 0.000000), r2.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(-1.767767, -1.767767, 0.000000, 0.000000)
  mov r1.z, l(-0.000000)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(-1.767767, -1.767767, -1.767767, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(-2.500000, -2.500000, 0.000000, 0.000000)
  mov r1.z, l(-0.000000)
  add r1.xyz, r1.xyzx, r2.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(-1.767766, -1.767766, 0.000000, 0.000000)
  mov r1.z, l(-0.000000)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(1.767768, 1.767768, 1.767768, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.x
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(-1.006119, -1.006119, 0.000000, 0.000000)
  mov r1.z, l(-0.000000)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(-0.396207, -0.396207, -0.396207, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.y
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(1.000015, 1.000015, 0.000000, 0.000000)
  mov r1.z, l(0)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(0.427335, 0.427335, 0.427335, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.z
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(0.416807, 0.416807, 0.000000, 0.000000)
  mov r1.z, l(0)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(-1.006577, -1.006577, -1.006577, 0.000000), r1.xyzx
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.w, r1.xyzx, t1.xxxx, s1, r5.w
  add r0.z, r0.w, r0.z
  mul r1.xy, r3.xyxx, l(-0.408872, -0.408872, 0.000000, 0.000000)
  mov r1.z, l(-0.000000)
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r4.xyzx, l(1.024430, 1.024430, 1.024430, 0.000000), r1.xyzx
  mad r0.x, r0.y, l(1.103011), r0.x
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.x, r1.xyzx, t1.xxxx, s1, r0.x
  add r0.x, r0.x, r0.z
  mul r0.x, r0.x, l(0.0833333358)
else 
  mov r0.x, l(1.000000)
endif 
add r0.x, r0.x, l(-0.500000)
mad_sat r0.x, r0.x, cb0[26].z, l(0.500000)
mad r0.x, r0.x, r0.x, l(-1.000000)
mad r0.x, cb0[26].y, r0.x, l(1.000000)
sqrt o0.zw, r0.xxxx
mov o0.xy, l(1.000000,1.000000,0,0)
ret 
// Approximately 0 instruction slots used
