I really would love to get away from the float3 type and use 64 bits to represent 3 unsigned float values.
In the past I have successfully bit packed 32 bit floats to 16 bit unsigned int representation and back to 32 bit floats, but this is slightly more complicated and I was wondering if any work has been done in this area.
The motivation is that my applications are running out of memory resources, (both shared and registers), and being able to represent 3 floating point values (x,y,z) in 64 bits may improve my occupancy.
Fortunately I know ahead of time that (x,y,z) will all be positive and probably have a discrete range of (0:1023) in floating point representation.
Will not use those 64 bit fields for accumulations so I think overflow would not be an issue, and I would like to squeeze as much precision as I can out of each 20-21 bit section. I am guessing I would need to use an unsigned long long rather than deal with something like a uint2.
I image there will be lots of reinterpret_cast () s, but would like to see if that overhead is offset by the by the possible occupancy benefits.
Did Google this but did not find anything, and I have a general idea of how to proceed, but if anyone has a link/reference to similar work it would be appreciated. I am sure I am not the only one who has considered this tactic.