mirror of https://github.com/PCSX2/pcsx2.git
GS: Update interlacing on Metal
This commit is contained in:
parent
89d44a5f60
commit
0c855cdd6d
|
@ -500,7 +500,6 @@ void GSDeviceMTL::DoInterlace(GSTexture* sTex, GSTexture* dTex, int shader, bool
|
|||
|
||||
GSMTLInterlacePSUniform cb = {};
|
||||
cb.ZrH = {0, 1.f / s.y};
|
||||
cb.hH = s.y / 2;
|
||||
|
||||
DoStretchRect(sTex, sRect, dTex, dRect, m_interlace_pipeline[shader], linear, shader > 1 ? LoadAction::DontCareIfFull : LoadAction::Load, &cb, sizeof(cb));
|
||||
}}
|
||||
|
|
|
@ -42,7 +42,6 @@ struct GSMTLConvertPSUniform
|
|||
struct GSMTLInterlacePSUniform
|
||||
{
|
||||
vector_float2 ZrH;
|
||||
float hH;
|
||||
};
|
||||
|
||||
struct GSMTLMainVSUniform
|
||||
|
|
|
@ -20,7 +20,7 @@ using namespace metal;
|
|||
fragment float4 ps_interlace0(ConvertShaderData data [[stage_in]], ConvertPSRes res,
|
||||
constant GSMTLInterlacePSUniform& uniform [[buffer(GSMTLBufferIndexUniforms)]])
|
||||
{
|
||||
if (fract(data.t.y * uniform.hH) - 0.5f < 0.f)
|
||||
if ((int(data.p.y) & 1) == 0)
|
||||
discard_fragment();
|
||||
return res.sample(data.t);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ fragment float4 ps_interlace0(ConvertShaderData data [[stage_in]], ConvertPSRes
|
|||
fragment float4 ps_interlace1(ConvertShaderData data [[stage_in]], ConvertPSRes res,
|
||||
constant GSMTLInterlacePSUniform& uniform [[buffer(GSMTLBufferIndexUniforms)]])
|
||||
{
|
||||
if (0.5f - fract(data.t.y * uniform.hH) < 0.f)
|
||||
if ((int(data.p.y) & 1) != 0)
|
||||
discard_fragment();
|
||||
return res.sample(data.t);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue