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 2024-03-25 21:36:48 -05:00 committed by refractionpcsx2
parent 68a71d2e12
commit e9ac262cd3
1 changed files with 4 additions and 4 deletions

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));
}