Skip to content

Commit

Permalink
GS-hw: Remove remaining 24bit destination checks for Ad.
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningterror committed Sep 1, 2022
1 parent cb2a21e commit 6279ae6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/resources/shaders/dx11/tfx.fx
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ PS_OUTPUT ps_main(PS_INPUT input)
if (PS_BLEND_C == 1 && PS_CLR_HW > 3)
{
float4 RT = trunc(RtTexture.Load(int3(input.p.xy, 0)) * 255.0f + 0.1f);
alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f;
alpha_blend = RT.a / 128.0f;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion bin/resources/shaders/opengl/tfx_fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ void ps_main()
#else
vec4 RT = trunc(texelFetch(RtSampler, ivec2(gl_FragCoord.xy), 0) * 255.0f + 0.1f);
#endif
float alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f;
float alpha_blend = RT.a / 128.0f;
#else
float alpha_blend = C.a / 128.0f;
#endif
Expand Down
2 changes: 1 addition & 1 deletion bin/resources/shaders/vulkan/tfx.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ void main()

#if (PS_BLEND_C == 1 && PS_CLR_HW > 3)
vec4 RT = trunc(subpassLoad(RtSampler) * 255.0f + 0.1f);
float alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f;
float alpha_blend = RT.a / 128.0f;
#else
float alpha_blend = C.a / 128.0f;
#endif
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/GS/Renderers/Metal/tfx.metal
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ struct PSMain
C.a = 128.0f;
}

float alpha_blend = SW_AD_TO_HW ? (PS_DFMT == FMT_24 ? 1.f : trunc(current_color.a * 255.5f) / 128.f) : (C.a / 128.f);
float alpha_blend = SW_AD_TO_HW ? (trunc(current_color.a * 255.5f) / 128.f) : (C.a / 128.f);

if (PS_DFMT == FMT_16)
{
Expand Down

0 comments on commit 6279ae6

Please sign in to comment.