1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Fix #12220: Add Decompress Bc5 to Squish

This Commit fixes the corrupted file preview described in #12220.
Added DecompressColourBc5 function to squish.
This commit is contained in:
Orkun
2017-11-19 02:24:31 +03:00
committed by Rémi Verschelde
parent 92a8a505a0
commit e021097c80
5 changed files with 246 additions and 1 deletions

View File

@@ -135,7 +135,13 @@ void Decompress( u8* rgba, void const* block, int flags )
colourBlock = reinterpret_cast< u8 const* >( block ) + 8;
// decompress colour
DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 );
// -- GODOT start --
//DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 );
if(( flags & ( kBc5 ) ) != 0)
DecompressColourBc5( rgba, colourBlock);
else
DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 );
// -- GODOT end --
// decompress alpha separately if necessary
if( ( flags & kDxt3 ) != 0 )