Merge fix for issue 134 into trunk.
This commit is contained in:
parent
849c4137be
commit
b288e3db7e
|
@ -132,7 +132,7 @@ void NormalCompressorDXT1a::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alp
|
|||
uint alphaMask = 0;
|
||||
for (uint i = 0; i < 16; i++)
|
||||
{
|
||||
if (rgba.color(i).a < 128) alphaMask |= (3 << (i * 2)); // Set two bits for each color.
|
||||
if (rgba.color(i).a == 0) alphaMask |= (3 << (i * 2)); // Set two bits for each color.
|
||||
}
|
||||
|
||||
const bool isSingleColor = rgba.isSingleColor();
|
||||
|
|
|
@ -533,7 +533,7 @@ void QuickCompress::compressDXT1a(const ColorBlock & rgba, BlockDXT1 * dxtBlock)
|
|||
|
||||
for (uint i = 0; i < 16; i++)
|
||||
{
|
||||
if (rgba.color(i).a < 128) {
|
||||
if (rgba.color(i).a == 0) {
|
||||
hasAlpha = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -482,8 +482,11 @@ int main(int argc, char *argv[])
|
|||
// Dither alpha when using BC2.
|
||||
compressionOptions.setQuantization(false, true, false);
|
||||
}
|
||||
|
||||
if (format == nvtt::Format_RGBA)
|
||||
else if (format == nvtt::Format_BC1a) {
|
||||
// Binary alpha when using BC1a.
|
||||
compressionOptions.setQuantization(false, true, true, 127);
|
||||
}
|
||||
else if (format == nvtt::Format_RGBA)
|
||||
{
|
||||
if (luminance)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user