something with gamma

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

something with gamma

Post by NeoHippo »

This has happened for quite a few versions.
I always play with gamma set to 1.5 in the option menu, however, when I open the ini file the value for gamma
has this long fractional value. I'm just wondering why that is.
Spoiler:
Anyways, my real problem is
while the gamma is set to 1.5 in the option menu,
every time I start a game the screen gamma is 1, and when I press F11 to adjust the gamma, the first key
press sets the gamma to the options value + 0.1, to 1.6.

Ending the game and restarting, then the screen is again at gamma 1. But now pressing F11 will set the
gamma to + 0.1, to 1.7 and so on, until eventually at 3.0 the gamma will roll over to start the cycle again.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: something with gamma

Post by dpJudas »

The fractional part in the config file is not a bug. It is just because floating point cannot express the value 1.5 exactly and the value you see is the closest it could get.

The easiest way to explain why is like if you take the number 2/3 and write that out: 2.6666666... You can never write the exact number in a base-10 number system. However, in a base-3 number system you can, here you could write that as 2. Computer floating point uses a base-2 floating point system with a mantissa and exponent. Long story short, the value you see there is the computer trying to write 1.5 as exact as that number system allows. User interfaces usually hide this by truncating or rounding the printed value so it looks exact, but what you see there in the ini file is what the program is really seeing/using.

About the gamma problem, are you running fullscreen (hardware gamma) or windowed (shader gamma)? There's a setting in the menus that can force one mode or the other. It will be useful to know if it happens for both types or only one. Secondly, we need the gzdoom boot log. It will tell us a little about your computer and what capabilities your OpenGL driver has.
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: something with gamma

Post by NeoHippo »

dpJudas wrote:The fractional part ...
Good to know, thanks.
dpJudas wrote:About the gamma problem, ...
That happens in fullscreen mode only, and regardless of which id game and/or map is played.
Spoiler:
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: something with gamma

Post by Gez »

dpJudas wrote:The easiest way to explain why is like if you take the number 2/3 and write that out: 2.6666666... You can never write the exact number in a base-10 number system. However, in a base-3 number system you can, here you could write that as 2.
Coffee first, then post. :P
Spoiler:
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: something with gamma

Post by dpJudas »

Haha, took a while for someone to point out my math is all broken. :)
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: something with gamma

Post by Rachael »

You don't really think about such things, because 2/3 is a rational number and it's one of those that does not repeat .0's on the end. So thinking about that exception alone, you forget about all the other maths present there. XD >_>
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: something with gamma

Post by NeoHippo »

Any idea what could be causing my problem with gamma in fullscreen mode?
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: something with gamma

Post by Rachael »

Try changing the value of vid_hwgamma from 0, to 1, to 2.
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: something with gamma

Post by NeoHippo »

It was set to 2, so I changed it to 1 and played with that setting for a few days now.
That seems to have "fixed" my problem.

Thank you. :)

Return to “Closed Bugs”