You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out the problem has to do with the conversion to gamma-corrected
intensities from the [0,1] values read in from the STB image library.
I thought the range would be [0,1), but instead it's [0,1]. Thus,
intensity values of 1.0 were mapped to 256, which then converted to 0
for unsigned 8-bit chars. Thankfully, I typo'ed the conversion in the
latest book 2 progression, and multiplied intensities by _257_, which
made the problem worse, and enough to to hit me.
This fix makes the conversion bullet-proof, and zero or negative
intensities are now mapped to 0, and values greater than or equal to 1.0
are now mapped to 255.
Resolves#1485
0 commit comments