Mastodon Feed: Post

Mastodon Feed

Boosted by kornel ("Kornel"):
pekkavaa@mastodon.gamedev.place ("Pekka Väänänen") wrote:

A new article on my website about a small thing that has bothered me for a long time:

Should you normalize RGB values by 255 or 256?
https://30fps.net/pages/255-vs-256-division/

A number line where 3-bit integers in the range [0..7] being mapped to real numbers with two approaches: the standard (top) and alternative (bottom). On the X-axis we’ve got a number line and the locations of brown circles on it represent the decoded floating-point values. The numbers inside are the integer inputs. Each integer has arrows pointing to it; these show a range of floating-point values that round to it. I’ll call these ranges “bins” in the rest of this article.