diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-20 19:45:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-20 19:45:42 +0400 |
commit | 438b19e94aa9615ca9163cad2d2d86fbeccdfd1a (patch) | |
tree | 827496274167434a926978e11be45339d833e367 /source/blender/imbuf | |
parent | 532f4b872edcb36fe7d70bf9c860eb7deb0c9ee0 (diff) |
Fix #33629: DDS DXT5 with alpha not loaded correctly, Y flipping code was wrong.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/dds/FlipDXT.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp index 05821b27ca6..660643530ba 100644 --- a/source/blender/imbuf/intern/dds/FlipDXT.cpp +++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp @@ -147,10 +147,10 @@ static void FlipDXT5BlockFull(uint8_t *block) block[2] = line_3_2 & 0xff; block[3] = (line_3_2 & 0xff00) >> 8; - block[4] = (line_3_2 & 0xff0000) >> 8; + block[4] = (line_3_2 & 0xff0000) >> 16; block[5] = line_1_0 & 0xff; block[6] = (line_1_0 & 0xff00) >> 8; - block[7] = (line_1_0 & 0xff0000) >> 8; + block[7] = (line_1_0 & 0xff0000) >> 16; // And flip the DXT1 block using the above function. FlipDXT1BlockFull(block + 8); @@ -165,7 +165,7 @@ static void FlipDXT5BlockHalf(uint8_t *block) ((line_0_1 & 0xfff000) >> 12); block[2] = line_1_0 & 0xff; block[3] = (line_1_0 & 0xff00) >> 8; - block[4] = (line_1_0 & 0xff0000) >> 8; + block[4] = (line_1_0 & 0xff0000) >> 16; FlipDXT1BlockHalf(block + 8); } |