mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Cleanup.
This commit is contained in:
parent
03f0c33cf4
commit
2df65f4e25
1 changed files with 2 additions and 0 deletions
|
@ -1118,6 +1118,8 @@ namespace bgfx
|
||||||
template<int32_t MantissaBits, int32_t ExpBits>
|
template<int32_t MantissaBits, int32_t ExpBits>
|
||||||
void encodeRgbE(float* _dst, const float* _src)
|
void encodeRgbE(float* _dst, const float* _src)
|
||||||
{
|
{
|
||||||
|
// Reference:
|
||||||
|
// https://www.opengl.org/registry/specs/EXT/texture_shared_exponent.txt
|
||||||
const int32_t expMax = (1<<ExpBits) - 1;
|
const int32_t expMax = (1<<ExpBits) - 1;
|
||||||
const int32_t expBias = (1<<(ExpBits - 1) ) - 1;
|
const int32_t expBias = (1<<(ExpBits - 1) ) - 1;
|
||||||
const float sharedExpMax = float( (1 << MantissaBits) - 1) / (1 << MantissaBits) * (1 << (expMax-expBias));
|
const float sharedExpMax = float( (1 << MantissaBits) - 1) / (1 << MantissaBits) * (1 << (expMax-expBias));
|
||||||
|
|
Loading…
Reference in a new issue