DevIL icon indicating copy to clipboard operation
DevIL copied to clipboard

DXT Endpoint detection problem

Open JohnJScott opened this issue 5 years ago • 0 comments

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

JohnJScott avatar Jan 18 '20 21:01 JohnJScott