3 ms·
How would using floating point avoid the conversion from linear to exponential range? You will still have to convert between brightness and voltage. And you wou
by yason 16y ago
How would using floating point avoid the conversion from linear to exponential range? You will still have to convert between brightness and voltage. And you would like to do gamma conversion in floating point anyway.
For the second point, programmers are familiar with base-2. For decimal values, both end-users and programmers confuse 127/128 vs. 255/256 for being half the latter. Besides, end-users often see [0.0, 1.0] floating point range for color values already in graphics user interfaces, and would expect 0.5 to give half the intensity that does 1.0.
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- jacobolus 16y agoObviously 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.