//SSAO addition 1.
// ---- Created with 3Dmigoto v0.6.181 on Sun Dec 31 12:54:52 2023
Texture2D<float4> t0 : register(t0);

SamplerState s0_s : register(s0);




// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float4 v0 : SV_POSITION0,
  float2 v1 : TEXCOORD0,
  out float3 o0 : SV_TARGET0,
  out float3 o1 : SV_TARGET1,
  out float2 o2 : SV_TARGET2)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  //v1.x+=stereo.x*-0.5;
  
  r0.xy = t0.SampleLevel(s0_s, v1.xy, 0).xy;
  r0.zw = (int2)r0.xy & int2(0x7f800000,0x7f800000);
  r0.zw = cmp((int2)r0.zw != int2(0x7f800000,0x7f800000));
  r0.xy = r0.zw ? r0.xy : 0;
  o0.xyz = r0.xxx;
  o1.xyz = r0.xxx;
  o2.xy = r0.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.181 on Sun Dec 31 12:54:52 2023
//
//
// 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   xyz         0   TARGET   float   xyz
// SV_TARGET                1   xyz         1   TARGET   float   xyz
// SV_TARGET                2   xy          2   TARGET   float   xy
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyz
dcl_output o1.xyz
dcl_output o2.xy
dcl_temps 1
sample_l_indexable(texture2d)(float,float,float,float) r0.xy, v1.xyxx, t0.xyzw, s0, l(0.000000)
and r0.zw, r0.xxxy, l(0, 0, 0x7f800000, 0x7f800000)
ine r0.zw, r0.zzzw, l(0, 0, 0x7f800000, 0x7f800000)
and r0.xy, r0.xyxx, r0.zwzz
mov o0.xyz, r0.xxxx
mov o1.xyz, r0.xxxx
mov o2.xy, r0.xyxx
ret
// Approximately 0 instruction slots used

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
