mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
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:
parent
9cd9d2e0d7
commit
288d7166bc
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue