More accurate GCN CMPR decoding

This commit is contained in:
Jack Andersen 2019-05-07 17:46:54 -10:00
parent 96c520ed95
commit 01bf9e6529
1 changed files with 3 additions and 2 deletions

View File

@ -185,8 +185,9 @@ void DecompressColourGCN( u8* rgba, void const* block )
} }
else else
{ {
codes[8 + i] = ( u8 )( ( 2*c + d )/3 ); // GCN: 3/8 blend rather than 1/3
codes[12 + i] = ( u8 )( ( c + 2*d )/3 ); codes[8 + i] = ( u8 )((c * 5 + d * 3) >> 3);
codes[12 + i] = ( u8 )((c * 3 + d * 5) >> 3);
} }
} }