GPU/TextureCache: Map replacement non-255 alpha to fully transparent

That way if during the scaling process you end up with interpolated
colours, the cutout alpha is preserved.

Ideally we'd blend it, but that tends to create more problems than it
solves on PSX.
pull/3334/head
Stenzek 11 months ago
parent 5fd79254bd
commit be7a20fef2
No known key found for this signature in database

@ -1842,6 +1842,9 @@ std::string GPU_HW_ShaderGen::GenerateReplacementMergeFragmentShader(bool semitr
#else #else
// Leave (0,0,0,0) as 0000 for opaque replacements for cutout alpha. // Leave (0,0,0,0) as 0000 for opaque replacements for cutout alpha.
o_col0.a = color.a; o_col0.a = color.a;
// Map anything with an alpha below 0.5 to transparent.
o_col0 = lerp(o_col0, float4(0.0, 0.0, 0.0, 0.0), float(o_col0.a < 0.5));
#endif #endif
} }
)"; )";

Loading…
Cancel
Save