bagginsbill opened this issue on Apr 23, 2008 · 2832 posts
bagginsbill posted Tue, 27 May 2008 at 5:32 PM
78 is the integer value, as expressed as a fraction of the maximum 8-bit RGB value, where 255 represents maximum intensity. So 78, in unit form, is 78/255. What I mean by unit form is using numbers from 0 to 1, where 1 means full intensity.
Gamma correction of 2.2 is expressed as the intensity, in unit form, raised to the power 1 / 2.2, or .4545454545.
And yes I said earlier that ** means "to the power of".
To do the math with the 8-bit form as well, you convert to unit form (divide by 255), do the power, then multiply with 255 to get back in 8-bit form.
((V / 255) ** (1 / 2.2)) * 255
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)