pixelformat: Fix unpack functions shifting by 14 instead of 15 for alpha to get MSB (#280)

This commit is contained in:
Sandy
2022-08-14 16:10:24 -07:00
committed by GitHub
parent 7ea3f88e46
commit 715b2baeef
+2 -2
View File
@@ -899,7 +899,7 @@ namespace bx
_dst[0] = float( ( (packed ) & 0x1f) ) / 31.0f;
_dst[1] = float( ( (packed>> 5) & 0x1f) ) / 31.0f;
_dst[2] = float( ( (packed>>10) & 0x1f) ) / 31.0f;
_dst[3] = float( ( (packed>>14) & 0x1) );
_dst[3] = float( ( (packed>>15) & 0x1) );
}
// BGR5A1
@@ -919,7 +919,7 @@ namespace bx
_dst[0] = float( ( (packed>>10) & 0x1f) ) / 31.0f;
_dst[1] = float( ( (packed>> 5) & 0x1f) ) / 31.0f;
_dst[2] = float( ( (packed ) & 0x1f) ) / 31.0f;
_dst[3] = float( ( (packed>>14) & 0x1) );
_dst[3] = float( ( (packed>>15) & 0x1) );
}
// RGB10A2