So what is this gamma thing that I’m always talking about? Here’s a quick question for you: What is half way between 0 and 255 on your monitor? Check out this image. The left and right sides are alternating lines of 0 and 255. Looking at the center 2 squares, the bottom square should about match the left and right whereas the top square should be much darker. What color is the bottom square?
You probably said “well, (0+255)/2=127.5, so either 127 or 128″. Now check out the answer. Here is the answer. Surprised? That’s because as you increase the value that you send to the screen, your screen outputs a nonlinear number of photons. And at 187, it outputs about half as many photons as it does at 255, IF you have a monitor that is well-calibrated to a gamma of 2.2. For more info, check out my GDC talk.