//Enemy out lines
cbuffer PS_Blur_Constants : register(b2)
{
  float2 g_xRcpScreenDims : packoffset(c0);
  float2 g_fBlurRadius : packoffset(c0.z);
}

cbuffer SkinCB : register(b13)
{
  float4 sk[5];   // sk[3].w = w del origen del objeto
}

SamplerState g_xFilteredClamp_s : register(s5);
Texture2D<float4> g_xScreenTexture : register(t0);

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

void main(
  float4 v0 : SV_Position0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;

  float4 s = StereoParams.Load(0);
  float w = max(sk[3].w, 0.01);
  float adjust = s.x * (1 - s.y / w) * 0.5;

  float2 uvBase = v0.xy * g_xRcpScreenDims.xy;
  uvBase.x -= adjust;

  r0.xy = uvBase - g_xRcpScreenDims.xy;
  r0.xyzw = g_xScreenTexture.Sample(g_xFilteredClamp_s, r0.xy).xyzw;
  r1.xyzw = float4(-1,1,1,-1) * g_xRcpScreenDims.xyxy;
  r1.xy = uvBase + r1.xy;
  r1.zw = uvBase + r1.zw;
  r2.xyzw = g_xScreenTexture.Sample(g_xFilteredClamp_s, r1.zw).xyzw;
  r1.xyzw = g_xScreenTexture.Sample(g_xFilteredClamp_s, r1.xy).xyzw;
  r0.xyzw = r1.xyzw + r0.xyzw;
  r0.xyzw = r0.xyzw + r2.xyzw;
  r1.xy = uvBase + g_xRcpScreenDims.xy;
  r1.xyzw = g_xScreenTexture.Sample(g_xFilteredClamp_s, r1.xy).xyzw;
  r0.xyzw = r1.xyzw + r0.xyzw;
  r0.xyzw = float4(0.25,0.25,0.25,0.25) * r0.xyzw;
  o0.xyz = r0.xyz * r0.www;
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
//   using 3Dmigoto v0.6.164 on Mon Oct 26 00:59:30 2026
//
//
// Buffer Definitions:
//
// cbuffer PS_Blur_Constants
// {
//
//   float2 g_xRcpScreenDims;           // Offset:    0 Size:     8
//   float2 g_fBlurRadius;              // Offset:    8 Size:     8 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_xFilteredClamp                  sampler      NA          NA    5        1
// g_xScreenTexture                  texture  float4          2d    0        1
// PS_Blur_Constants                 cbuffer      NA          NA    2        1
//
//
//
// 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_4_0
dcl_constantbuffer CB2[1], immediateIndexed
dcl_sampler s5, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 3
mad r0.xy, v0.xyxx, cb2[0].xyxx, -cb2[0].xyxx
sample r0.xyzw, r0.xyxx, t0.xyzw, s5
mul r1.xyzw, cb2[0].xyxy, l(-1.000000, 1.000000, 1.000000, -1.000000)
mad r1.xy, v0.xyxx, cb2[0].xyxx, r1.xyxx
mad r1.zw, v0.xxxy, cb2[0].xxxy, r1.zzzw
sample r2.xyzw, r1.zwzz, t0.xyzw, s5
sample r1.xyzw, r1.xyxx, t0.xyzw, s5
add r0.xyzw, r0.xyzw, r1.xyzw
add r0.xyzw, r2.xyzw, r0.xyzw
mad r1.xy, v0.xyxx, cb2[0].xyxx, cb2[0].xyxx
sample r1.xyzw, r1.xyxx, t0.xyzw, s5
add r0.xyzw, r0.xyzw, r1.xyzw
mul r0.xyzw, r0.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
mul o0.xyz, r0.wwww, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 16 instruction slots used

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