Fix issue 115.

2.0
castano 14 years ago
parent d0315d6408
commit 24cde600ca

@ -1,3 +1,6 @@
NVIDIA Texture Tools version 2.0.8
* ColorBlock::isSingleColor compares only RGB channels. Fixes issue 115.
NVIDIA Texture Tools version 2.0.7
* Output correct exit codes. Fixes issue 92.
* Fix thread-safety errors. Fixes issue 90.

@ -113,15 +113,18 @@ void ColorBlock::splatY()
/// Returns true if the block has a single color.
bool ColorBlock::isSingleColor() const
{
for(int i = 1; i < 16; i++)
{
if (m_color[0] != m_color[i])
{
return false;
}
}
return true;
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
uint u = m_color[0].u & mask.u;
for (int i = 1; i < 16; i++)
{
if (u != (m_color[i].u & mask.u))
{
return false;
}
}
return true;
}
/// Count number of unique colors in this color block.

Loading…
Cancel
Save