mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Fixed unpackRgba4.
This commit is contained in:
parent
2df65f4e25
commit
507e81641d
1 changed files with 4 additions and 4 deletions
|
@ -1239,10 +1239,10 @@ namespace bgfx
|
|||
void unpackRgba4(float* _dst, const void* _src)
|
||||
{
|
||||
uint16_t packed = *( (const uint16_t*)_src);
|
||||
_dst[0] = float( ( (packed ) & 0x7) ) / 15.0f;
|
||||
_dst[1] = float( ( (packed>> 4) & 0x7) ) / 15.0f;
|
||||
_dst[2] = float( ( (packed>> 8) & 0x7) ) / 15.0f;
|
||||
_dst[3] = float( ( (packed>>12) & 0x7) ) / 15.0f;
|
||||
_dst[0] = float( ( (packed ) & 0xf) ) / 15.0f;
|
||||
_dst[1] = float( ( (packed>> 4) & 0xf) ) / 15.0f;
|
||||
_dst[2] = float( ( (packed>> 8) & 0xf) ) / 15.0f;
|
||||
_dst[3] = float( ( (packed>>12) & 0xf) ) / 15.0f;
|
||||
}
|
||||
|
||||
// RGB5A1
|
||||
|
|
Loading…
Reference in a new issue