DevIL
DevIL copied to clipboard
DXT Endpoint detection problem
void DxtcReadColor(ILushort Data, Color8888* Out) { ILubyte r, g, b;
b = Data & 0x1f;
g = (Data & 0x7E0) >> 5;
r = (Data & 0xF800) >> 11;
Out->r = r << 3 | r >> 2;
Out->g = g << 2 | g >> 3;
Out->b = b << 3 | r >> 2;
}
I suspect the r >> 2 when calculating Out->b should be b >> 2.
Cheers John