GS/HW: Adjust RTA shader precision.

This commit is contained in:
lightningterror 2024-02-29 22:47:02 +01:00
parent 97237c963f
commit 3a2888a5d5
4 changed files with 8 additions and 8 deletions

View File

@ -139,7 +139,7 @@ PS_OUTPUT ps_rta_correction(PS_INPUT input)
{
PS_OUTPUT output;
float4 value = sample_c(input.t);
output.c = float4(value.rgb, (value.a * 255.0f) / 127.5f);
output.c = float4(value.rgb, (value.a * 255.0f + 0.1f) / 127.5f);
return output;
}
@ -147,7 +147,7 @@ PS_OUTPUT ps_rta_decorrection(PS_INPUT input)
{
PS_OUTPUT output;
float4 value = sample_c(input.t);
output.c = float4(value.rgb, (value.a * 127.5f) / 255.0f);
output.c = float4(value.rgb, (value.a * 127.5f + 0.1f) / 255.0f);
return output;
}

View File

@ -337,7 +337,7 @@ void ps_datm0_rta_correction()
void ps_rta_correction()
{
vec4 value = sample_c();
SV_Target0 = vec4(value.rgb, (value.a * 255.0f) / 127.5f);
SV_Target0 = vec4(value.rgb, (value.a * 255.0f + 0.1f) / 127.5f);
}
#endif
@ -345,7 +345,7 @@ void ps_rta_correction()
void ps_rta_decorrection()
{
vec4 value = sample_c();
SV_Target0 = vec4(value.rgb, (value.a * 127.5f) / 255.0f);
SV_Target0 = vec4(value.rgb, (value.a * 127.5f + 0.1f) / 255.0f);
}
#endif

View File

@ -114,7 +114,7 @@ void ps_datm0_rta_correction()
void ps_rta_correction()
{
vec4 value = sample_c(v_tex);
o_col0 = vec4(value.rgb, (value.a * 255.0f) / 127.5f);
o_col0 = vec4(value.rgb, (value.a * 255.0f + 0.1f) / 127.5f);
}
#endif
@ -122,7 +122,7 @@ void ps_rta_correction()
void ps_rta_decorrection()
{
vec4 value = sample_c(v_tex);
o_col0 = vec4(value.rgb, (value.a * 127.5f) / 255.0f);
o_col0 = vec4(value.rgb, (value.a * 127.5f + 0.1f) / 255.0f);
}
#endif

View File

@ -129,13 +129,13 @@ fragment float4 ps_primid_rta_init_datm0(float4 p [[position]], DirectReadTextur
fragment float4 ps_rta_correction(float4 p [[position]], DirectReadTextureIn<float> tex)
{
float4 in = tex.read(p);
return float4(in.rgb, (in.a * 255.f) / 127.5f);
return float4(in.rgb, (in.a * 255.f + 0.1f) / 127.5f);
}
fragment float4 ps_rta_decorrection(float4 p [[position]], DirectReadTextureIn<float> tex)
{
float4 in = tex.read(p);
return float4(in.rgb, (in.a * 127.5f) / 255.f);
return float4(in.rgb, (in.a * 127.5f + 0.1f) / 255.f);
}
fragment float4 ps_hdr_init(float4 p [[position]], DirectReadTextureIn<float> tex)