Converting a uint8 value to a normalized float is pretty straight forward:
uint8 i = 0xAF;
float f = float(i)/float(0xFF);
But this feels more expensive than it should be...
Is there a way of making this conversion that's more efficient? I ask mostly out of curiosity, but also because my 3D program makes this conversion a significant number of times.
Readability isn't important, and the uint8 would always span the entire range
0 == 0.f
and 255 == 1.f