This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // reference https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_shared_exponent.txt | |
| const RGB9E5_MANTISSA_BITS = 9; | |
| const RGB9E5_EXP_BIAS = 15; | |
| const RGB9E5_MAX_VALID_BIASED_EXP = 31; | |
| const MAX_RGB9E5_EXP = ( RGB9E5_MAX_VALID_BIASED_EXP - RGB9E5_EXP_BIAS ); | |
| const RGB9E5_MANTISSA_VALUES = ( 1 << RGB9E5_MANTISSA_BITS ); | |
| const MAX_RGB9E5_MANTISSA = ( RGB9E5_MANTISSA_VALUES - 1 ); | |
| const MAX_RGB9E5 = ( ( MAX_RGB9E5_MANTISSA ) / RGB9E5_MANTISSA_VALUES * ( 1 << MAX_RGB9E5_EXP ) ); |