GS:MTL: RTA correction shader is used to scale textures

Can't use a DirectReadTextureIn, which reads from the pixel with the same location
This commit is contained in:
TellowKrinkle authored and refractionpcsx2 committed 2024-03-26 07:38:16 +00:00
1 parent 68a71d2e12
commit e9ac262cd3
1 file changed
+4 -4
+4 -4
View File
@@ -126,15 +126,15 @@ fragment float4 ps_primid_rta_init_datm0(float4 p [[position]], DirectReadTextur
return tex.read(p).a > (254.5f / 255.f) ? -1 : FLT_MAX;
}
fragment float4 ps_rta_correction(float4 p [[position]], DirectReadTextureIn<float> tex)
fragment float4 ps_rta_correction(ConvertShaderData data [[stage_in]], ConvertPSRes res)
{
float4 in = tex.read(p);
float4 in = res.sample(data.t);
return float4(in.rgb, in.a / (127.5f / 255.0f));
}
fragment float4 ps_rta_decorrection(float4 p [[position]], DirectReadTextureIn<float> tex)
fragment float4 ps_rta_decorrection(ConvertShaderData data [[stage_in]], ConvertPSRes res)
{
float4 in = tex.read(p);
float4 in = res.sample(data.t);
return float4(in.rgb, in.a * (128.25f / 255.0f));
}