Fix BC6 block decoder

This commit is contained in:
ShadelessFox 2022-07-17 17:11:52 +03:00
parent 04e9854417
commit f58c0ea533
No known key found for this signature in database
GPG Key ID: 1CF8D77ADDADADD9

View File

@ -750,8 +750,10 @@ decode_bc6_block(rgb32f *col, const UINT8 *src, int sign) {
} }
} }
if (info->tr) { /* apply deltas */ if (info->tr) { /* apply deltas */
for (i = 3; i < numep; i++) { for (i = 3; i < numep; i += 3) {
endpoints[i] = (endpoints[i] + endpoints[0]) & mask; endpoints[i] = (endpoints[i] + endpoints[0]) & mask;
endpoints[i + 1] = (endpoints[i + 1] + endpoints[1]) & mask;
endpoints[i + 2] = (endpoints[i + 2] + endpoints[2]) & mask;
} }
if (sign) { if (sign) {
for (i = 3; i < numep; i += 3) { for (i = 3; i < numep; i += 3) {