Simplify alphasum checking for DXT textures, and fix a regression

Got some weird blackness in the sky in Gran Turismo. This fixes that.
This commit is contained in:
Henrik Rydgård committed 2022-04-25 00:54:47 +02:00
1 parent 2178567ba0
commit 35e7affa3e
2 files changed
+16 -25

No files matched your search

+1 -1
View File
@@ -637,7 +637,7 @@ void DecodeDXT1Block(u32 *dst, const DXT1Block *src, int pitch, int height, u32
DXTDecoder dxt;
dxt.DecodeColors(src, false);
dxt.WriteColorsDXT1(dst, src, pitch, height);
*alpha = dxt.AnyNonFullAlpha() ? 0 : 0xFFFFFFFF;
*alpha &= dxt.AnyNonFullAlpha() ? 0 : 1;
}
void DecodeDXT3Block(u32 *dst, const DXT3Block *src, int pitch, int height) {