sw_engine: fix regression in alpha handling

revert the alpha skip condition introduced in
commit 2990e72b23.

color values with alpha = 0 must be transformed to 0
to ensure correct intermediate composition results.
This commit is contained in:
Hermet Park 2025-05-07 10:54:08 +09:00
parent 24fba7cfae
commit ae84708f9b

View file

@ -1706,7 +1706,7 @@ void rasterPremultiply(RenderSurface* surface)
for (uint32_t x = 0; x < surface->w; ++x, ++dst) {
auto c = *dst;
auto a = (c >> 24);
if (a == 255 || a == 0) continue;
if (a == 255) continue;
*dst = (c & 0xff000000) + ((((c >> 8) & 0xff) * a) & 0xff00) + ((((c & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
}
}