The language is cg.
I have an 8-bit float that must be between 0 and 1 (it's the 'a' component of a float4 rgba color value). I want to store a 6-bit unsigned integer and a 2-bit unsigned integer in that. How can I safely store these two values in those 8 bits?
I couldn't find any documentation on the format of an 8-bit float, especially one limited between 0 and 1. I'm assuming it's more complicated than just data / 255
?