Merge pull request #7401 from radarhere/bc5s

Fixed bug when reading BC5S DDS images
This commit is contained in:
Andrew Murray 2023-09-20 18:28:46 +10:00 committed by GitHub
commit 8d81fd98a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -118,8 +118,8 @@ decode_bc3_alpha(char *dst, const UINT8 *src, int stride, int o, int sign) {
if (sign == 1) {
bc5s_alpha b;
memcpy(&b, src, sizeof(bc5s_alpha));
a0 = (b.a0 + 255) / 2;
a1 = (b.a1 + 255) / 2;
a0 = b.a0 + 128;
a1 = b.a1 + 128;
lut1 = b.lut[0] | (b.lut[1] << 8) | (b.lut[2] << 16);
lut2 = b.lut[3] | (b.lut[4] << 8) | (b.lut[5] << 16);
} else {