So, it's basically saying that anything less than 1/256 (0.00390625f) is 0x0.
Anything equal to or over 0.99609375 (255/256) should be 0xff.
Divide by the count (256), not the max index (255). I'm not sure the 0.5 offset is really needed.
So, it's basically saying that anything less than 1/256 (0.00390625f) is 0x0.
Anything equal to or over 0.99609375 (255/256) should be 0xff.
Divide by the count (256), not the max index (255). I'm not sure the 0.5 offset is really needed.