//ACombat7 -- disabled shadows
// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_09_Lights2]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun Feb 27 19:00:40 2022
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// 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 | forceEarlyDepthStencil
dcl_constantbuffer cb0[31], immediateIndexed
dcl_constantbuffer cb1[129], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 7
dcl_resource_texture2d (float,float,float,float) t125

mul r0.xy, v0.xyxx, cb1[128].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].z, -cb1[53].w
mad r0.x, r0.x, cb1[53].x, cb1[53].y
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
add r0.x, r0.y, r0.x
mad r0.yz, v0.xxyx, cb1[128].zzwz, -cb1[54].wwzw
div r0.yz, r0.yyzy, cb1[54].xxyx
mul r0.yz, r0.xxxx, r0.yyzy



mul r1.xyzw, r0.zzzz, cb0[28].xyzw
mad r1.xyzw, r0.yyyy, cb0[27].xyzw, r1.xyzw

//PS
mad r0.xyzw, r0.xxxx, cb0[29].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[30].xyzw

div r0.xy, r0.xyxx, r0.wwww





min r0.z, r0.z, l(0.999990)
mad r0.xy, r0.xyxx, cb0[1].xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
frc r1.xy, r0.xyxx
round_ni r0.xy, r0.xyxx
add r0.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mul r0.xy, r0.xyxx, cb0[1].zwzz
gather4_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r2.xyzw, r0.xyxx, t1.xyzw, s1.x
add r2.xyzw, -r0.zzzz, r2.xyzw
mad_sat r2.xyzw, r2.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t1.xyzw, s1.x
add r3.xyzw, -r0.zzzz, r3.xyzw
mad_sat r3.xyzw, r3.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
add r1.zw, -r1.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
mad r3.xy, r3.wxww, r1.zzzz, r3.zyzz
add r2.xw, r2.wwwx, r3.xxxy
mad r2.xy, r2.zyzz, r1.xxxx, r2.xwxx
gather4_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t1.xyzw, s1.x
gather4_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r4.xyzw, r0.xyxx, t1.xyzw, s1.x
add r4.xyzw, -r0.zzzz, r4.xyzw
add r0.xyzw, -r0.zzzz, r3.xyzw
mad_sat r0.xyzw, r0.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
mad_sat r3.xyzw, r4.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
mad r3.xy, r3.wxww, r1.zzzz, r3.zyzz
add r0.xw, r0.wwwx, r3.xxxy
mad r2.zw, r0.zzzy, r1.xxxx, r0.xxxw
mul r4.xw, r1.wwwy, l(0.111111112, 0.000000, 0.000000, 0.111111112)
mov r4.yz, l(0,0.111111112,0.111111112,0)
dp4 r0.x, r2.xyzw, r4.xyzw
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.xz, r0.xxxx
//mov o0.yw, l(0,1.000000,0,1.000000)
ret
// Approximately 0 instruction slots used
