//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions: 
//
// cbuffer _Globals
// {
//
//   float Subpix;                      // Offset:    0 Size:     4
//   float EdgeThreshold;               // Offset:    4 Size:     4
//   float EdgeThresholdMin;            // Offset:    8 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim      HLSL Bind  Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// __s0                              sampler      NA          NA             s0      1 
// __V__ReShade__BackBufferTex       texture  float4          2d             t0      1 
// _Globals                          cbuffer      NA          NA            cb0      1 
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   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[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 8
sample_l_indexable(texture2d)(float,float,float,float) r0.xyzw, v1.xyxx, t0.xyzw, s0, l(0.000000)
gather4_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t0.xyzw, s0.w
gather4_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r2.xyz, v1.xyxx, t0.xzwy, s0.w
max r1.w, r0.w, r1.x
min r2.w, r0.w, r1.x
max r1.w, r1.w, r1.z
min r2.w, r1.z, r2.w
max r3.x, r2.x, r2.y
min r3.y, r2.x, r2.y
max r1.w, r1.w, r3.x
min r2.w, r2.w, r3.y
mul r3.x, r1.w, cb0[0].y
add r1.w, r1.w, -r2.w
max r2.w, r3.x, cb0[0].z
ge r2.w, r1.w, r2.w
if_nz r2.w
  add r3.xyzw, v1.xyxy, l(0.000397, -0.000667, -0.000397, 0.000667)
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r3.xyxx, t0.xyzw, s0, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r3.x, r3.zwzz, t0.wxyz, s0, l(0.000000)
  add r3.yz, r1.xxzx, r2.yyxy
  div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
  add r3.w, r3.z, r3.y
  mad r3.yz, r0.wwww, l(0.000000, -2.000000, -2.000000, 0.000000), r3.yyzy
  add r4.x, r1.y, r2.w
  add r2.w, r2.w, r2.z
  mad r4.y, r1.z, l(-2.000000), r4.x
  mad r2.w, r2.y, l(-2.000000), r2.w
  add r2.z, r2.z, r3.x
  add r1.y, r1.y, r3.x
  mad r3.x, |r3.y|, l(2.000000), |r4.y|
  mad r2.w, |r3.z|, l(2.000000), |r2.w|
  mad r3.y, r2.x, l(-2.000000), r2.z
  mad r1.y, r1.x, l(-2.000000), r1.y
  add r3.x, r3.x, |r3.y|
  add r1.y, r2.w, |r1.y|
  add r2.z, r4.x, r2.z
  ge r1.y, r3.x, r1.y
  mad r2.z, r3.w, l(2.000000), r2.z
  movc r2.x, r1.y, r2.y, r2.x
  movc r1.x, r1.y, r1.x, r1.z
  mad r1.z, r2.z, l(0.083333), -r0.w
  add r2.y, -r0.w, r2.x
  add r2.z, -r0.w, r1.x
  add r2.x, r0.w, r2.x
  add r1.x, r0.w, r1.x
  ge r2.w, |r2.y|, |r2.z|
  max r2.y, |r2.z|, |r2.y|
  movc r3.xyzw, r1.yyyy, l(0.000667,-0.000667,0,-0.000397), l(0.000397,-0.000397,0.000667,-0.000000)
  movc r2.z, r2.w, r3.y, r3.x
  mul_sat r1.z, r1.w, |r1.z|
  and r3.xy, r1.yyyy, l(0x39d00d01, 0x3a1c09c1, 0, 0)
  mad r4.xy, r2.zzzz, l(0.500000, 0.500000, 0.000000, 0.000000), v1.xyxx
  movc r1.w, r1.y, v1.x, r4.x
  movc r4.x, r1.y, r4.y, v1.y
  add r5.x, r3.w, r1.w
  movc r6.xyzw, r1.yyyy, l(-0.000000,-0.000595,0,-0.000000), l(-0.000667,-0.000000,0.001000,-0.001000)
  add r5.y, r4.x, r6.x
  add r7.x, r3.x, r1.w
  add r7.y, r3.z, r4.x
  mad r1.w, r1.z, l(-2.000000), l(3.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r3.z, r5.xyxx, t0.xywz, s0, l(0.000000)
  mul r1.z, r1.z, r1.z
  sample_l_indexable(texture2d)(float,float,float,float) r3.w, r7.xyxx, t0.xyzw, s0, l(0.000000)
  movc r1.x, r2.w, r2.x, r1.x
  mul r2.x, r2.y, l(0.250000)
  mad r2.y, -r1.x, l(0.500000), r0.w
  mul r1.z, r1.z, r1.w
  lt r1.w, r2.y, l(0.000000)
  mad r2.y, -r1.x, l(0.500000), r3.z
  mad r2.w, -r1.x, l(0.500000), r3.w
  ge r3.zw, |r2.yyyw|, r2.xxxx
  add r4.xy, r5.xyxx, r6.ywyy
  movc r4.xy, r3.zzzz, r5.xyxx, r4.xyxx
  not r4.zw, r3.zzzw
  or r4.z, r4.w, r4.z
  add r3.y, r3.y, r7.x
  movc r5.x, r3.w, r7.x, r3.y
  add r3.y, r6.z, r7.y
  movc r5.y, r3.w, r7.y, r3.y
  if_nz r4.z
    if_z r3.z
      sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
    endif 
    if_z r3.w
      sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
    endif 
    mad r3.y, -r1.x, l(0.500000), r2.y
    movc r2.y, r3.z, r2.y, r3.y
    mad r3.y, -r1.x, l(0.500000), r2.w
    movc r2.w, r3.w, r2.w, r3.y
    ge r3.yz, |r2.yywy|, r2.xxxx
    mad r3.w, -r3.x, l(2.000000), r4.x
    movc r4.x, r3.y, r4.x, r3.w
    movc r4.zw, r1.yyyy, l(0,0,0,-0.000000), l(0,0,0.001333,-0.001333)
    add r3.w, r4.w, r4.y
    movc r4.y, r3.y, r4.y, r3.w
    not r5.zw, r3.yyyz
    or r3.w, r5.w, r5.z
    mad r5.z, r3.x, l(2.000000), r5.x
    movc r5.x, r3.z, r5.x, r5.z
    add r5.z, r4.z, r5.y
    movc r5.y, r3.z, r5.y, r5.z
    if_nz r3.w
      if_z r3.y
        sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
      endif 
      if_z r3.z
        sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
      endif 
      mad r3.w, -r1.x, l(0.500000), r2.y
      movc r2.y, r3.y, r2.y, r3.w
      mad r3.y, -r1.x, l(0.500000), r2.w
      movc r2.w, r3.z, r2.w, r3.y
      ge r3.yz, |r2.yywy|, r2.xxxx
      mad r3.w, -r3.x, l(2.000000), r4.x
      movc r4.x, r3.y, r4.x, r3.w
      add r3.w, r4.w, r4.y
      movc r4.y, r3.y, r4.y, r3.w
      not r5.zw, r3.yyyz
      or r3.w, r5.w, r5.z
      mad r5.z, r3.x, l(2.000000), r5.x
      movc r5.x, r3.z, r5.x, r5.z
      add r5.z, r4.z, r5.y
      movc r5.y, r3.z, r5.y, r5.z
      if_nz r3.w
        if_z r3.y
          sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
        endif 
        if_z r3.z
          sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
        endif 
        mad r3.w, -r1.x, l(0.500000), r2.y
        movc r2.y, r3.y, r2.y, r3.w
        mad r3.y, -r1.x, l(0.500000), r2.w
        movc r2.w, r3.z, r2.w, r3.y
        ge r3.yz, |r2.yywy|, r2.xxxx
        mad r3.w, -r3.x, l(2.000000), r4.x
        movc r4.x, r3.y, r4.x, r3.w
        add r3.w, r4.w, r4.y
        movc r4.y, r3.y, r4.y, r3.w
        not r5.zw, r3.yyyz
        or r3.w, r5.w, r5.z
        mad r5.z, r3.x, l(2.000000), r5.x
        movc r5.x, r3.z, r5.x, r5.z
        add r5.z, r4.z, r5.y
        movc r5.y, r3.z, r5.y, r5.z
        if_nz r3.w
          if_z r3.y
            sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
          endif 
          if_z r3.z
            sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
          endif 
          mad r3.w, -r1.x, l(0.500000), r2.y
          movc r2.y, r3.y, r2.y, r3.w
          mad r3.y, -r1.x, l(0.500000), r2.w
          movc r2.w, r3.z, r2.w, r3.y
          ge r3.yz, |r2.yywy|, r2.xxxx
          mad r3.w, -r3.x, l(2.000000), r4.x
          movc r4.x, r3.y, r4.x, r3.w
          add r3.w, r4.w, r4.y
          movc r4.y, r3.y, r4.y, r3.w
          not r5.zw, r3.yyyz
          or r3.w, r5.w, r5.z
          mad r3.x, r3.x, l(2.000000), r5.x
          movc r5.x, r3.z, r5.x, r3.x
          add r3.x, r4.z, r5.y
          movc r5.y, r3.z, r5.y, r3.x
          if_nz r3.w
            if_z r3.y
              sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
            endif 
            if_z r3.z
              sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
            endif 
            mad r3.x, -r1.x, l(0.500000), r2.y
            movc r2.y, r3.y, r2.y, r3.x
            mad r3.x, -r1.x, l(0.500000), r2.w
            movc r2.w, r3.z, r2.w, r3.x
            ge r3.xy, |r2.ywyy|, r2.xxxx
            and r3.z, r1.y, l(0x3ad00d01)
            movc r6.xyz, r1.yyyy, l(-0.001587,0,-0.000000,0), l(-0.000000,0.002667,-0.002667,0)
            add r4.zw, r4.xxxy, r6.xxxz
            movc r4.xy, r3.xxxx, r4.xyxx, r4.zwzz
            not r4.zw, r3.xxxy
            or r3.w, r4.w, r4.z
            add r3.z, r3.z, r5.x
            movc r5.x, r3.y, r5.x, r3.z
            add r3.z, r5.y, r6.y
            movc r5.y, r3.y, r5.y, r3.z
            if_nz r3.w
              if_z r3.x
                sample_l_indexable(texture2d)(float,float,float,float) r2.y, r4.xyxx, t0.ywzx, s0, l(0.000000)
              endif 
              if_z r3.y
                sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t0.yxzw, s0, l(0.000000)
              endif 
              mad r3.z, -r1.x, l(0.500000), r2.y
              movc r2.y, r3.x, r2.y, r3.z
              mad r1.x, -r1.x, l(0.500000), r2.w
              movc r2.w, r3.y, r2.w, r1.x
              ge r3.xy, |r2.ywyy|, r2.xxxx
              and r1.x, r1.y, l(0x3b9c09c1)
              movc r6.xyz, r1.yyyy, l(-0.004762,0,-0.000000,0), l(-0.000000,0.008000,-0.008000,0)
              add r3.zw, r4.xxxy, r6.xxxz
              movc r4.xy, r3.xxxx, r4.xyxx, r3.zwzz
              add r1.x, r1.x, r5.x
              movc r5.x, r3.y, r5.x, r1.x
              add r1.x, r5.y, r6.y
              movc r5.y, r3.y, r5.y, r1.x
            endif 
          endif 
        endif 
      endif 
    endif 
  endif 
  add r1.x, -r4.x, v1.x
  add r2.x, r5.x, -v1.x
  add r3.x, -r4.y, v1.y
  movc r1.x, r1.y, r1.x, r3.x
  add r3.x, r5.y, -v1.y
  movc r2.x, r1.y, r2.x, r3.x
  lt r2.yw, r2.yyyw, l(0.000000, 0.000000, 0.000000, 0.000000)
  add r3.x, r1.x, r2.x
  ine r2.yw, r1.wwww, r2.yyyw
  div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
  lt r3.x, r1.x, r2.x
  min r1.x, r1.x, r2.x
  movc r2.x, r3.x, r2.y, r2.w
  mul r1.z, r1.z, r1.z
  mad r1.x, r1.x, -r1.w, l(0.500000)
  mul r1.z, r1.z, cb0[0].x
  and r1.x, r1.x, r2.x
  max r1.x, r1.z, r1.x
  mad r1.xz, r1.xxxx, r2.zzzz, v1.xxyx
  movc r2.x, r1.y, v1.x, r1.x
  movc r2.y, r1.y, r1.z, v1.y
  sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r2.xyxx, t0.xyzw, s0, l(0.000000)
endif 
mov o0.xyzw, r0.xyzw
ret 
// Approximately 241 instruction slots used
