2 ms·
Obviously you take integer gamma-compressed values, convert to floats, and then un-gamma-compress those, doing intermediate math on the linearized floats, and t
by jacobolus 16y ago
Obviously you take integer gamma-compressed values, convert to floats, and then un-gamma-compress those, doing intermediate math on the linearized floats, and then gamma compressing and converting back to integers when you need to save out a file of some sort.
For showing the amount in each component to users, it's possible to use either linear or gamma-compressed values, depending on the goal, but either way showing a decimal makes it a lot easier to understand than showing a fraction of 255.