Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

niexuchina

don't laugh at me.what is gamma?

This topic is 5166 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Gamma is a greek letter. Gamma is used to denote constants or variables in many different contexts. Even within a limited scope such as game programming, gamma can be used to denote a large number of things. If I had to guess what you''re talking about I''d assume you''re asking about "gamma correction". Which is adjusting input signals to account for different intensity to voltage response curves in monitors.

Share this post


Link to post
Share on other sites
In simplest terms, gamma is the ratio of the numerical value of a pixel to its actual screen brightness. A higher gamma means a brighter pixel.


John Bolton
Page 44 Studios
Current project: NHL Faceoff 2005 PS2

Share this post


Link to post
Share on other sites
In simplistic terms, if you change your monitor''s brightness setting, you can make your screen very dark or extremely light. This is the basic idea behind gama -- higher gama yeilds lighter scenes, while lower gama yeilds darker scenes.

Share this post


Link to post
Share on other sites
Yeah, I would like to know this too. If I''m developing a game and I want to include ''Gamma correction'' in it''s options, how do I have to modify every pixel that''s going to the screen? What mathematical formula is used here?

Share this post


Link to post
Share on other sites
I believe in most graphics APIs there is a specific option to set the general screen gamma. Eg. Direct Draw had some object for it I remember, and the newer Direct 3D could have either some special function for it or as some render state. OpenGL I''d assume to have some function for this purpose as well.

Share this post


Link to post
Share on other sites
OK, I did a little searching and found this formula for anyone interested:

newcolorvalue = oldcolorvalue ^ gamma

where color values are from [0, 1]. For colors from [0, 255] this becomes:

newcolorvalue = 255 * ((oldcolorvalue / 255) ^ gamma)

For gamma = 1 the color stays unchanged, for gamma > 1 it is brighter and for gamma < 1 it is darker.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!