OSDN Git Service
[fixed] Color.toFloatBits() methods. Will half the precision of the alpha channel of 32-bit rgba colors. Nothing i can do about it. Problem is that Java only has a single canonical NaN value. Using Float.intBitsToFloat() will convert any signaling NaN to that canonical value, transforming colors like 0xfeaaeb3c to 0xfeeaeb3c. The fix just masks the 32-bit int via 0xfeffffff before it is passed ot Color.toFloatBits() effectively making it impossible to return canonical NaNs. This of course means that the least significant bit of the alpha component is always 0, so you only have 128 alpha values really :p. Darn Java. Darn FPUs.