Fix ASTBlendPixel outputting empty pixels if the background pixel was empty, BUT if the foreground pixel had no alpha at all

This commit is contained in:
Jaime Passos 2020-05-15 16:41:39 -03:00
parent 9cd9d2e0d7
commit 288d7166bc
1 changed files with 7 additions and 1 deletions

View File

@ -244,7 +244,13 @@ UINT32 ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alph
// if the background pixel is empty, match software and don't blend anything
if (!background.s.alpha)
output.rgba = 0;
{
// ...unless the foreground pixel ISN'T actually translucent.
if (alpha == 0xFF)
output.rgba = foreground.rgba;
else
output.rgba = 0;
}
else
{
UINT8 beta = (0xFF - alpha);