Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable overbright by default + make fully configurable #1350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slipher
Copy link
Member

@slipher slipher commented Oct 12, 2024

  1. Change cvars so that all overbright settings can easily be tested. The current overbright-related cvars have a wonky asymmetric design that can make it impossible to test a setting without editing the map. Fix that. With this commit we can use r_overbrightDefaultExponent (0-3) and r_overbrightDefaultClamp (on/off) to control the default settings when the map doesn't say anything, and one more cvar r_overbrightIgnoreMapSettings to make those cvar values override the worldspawn values even if present. In the worldspawn entity mapOverBrightBits can stay as is, but forceLegacyOverBrightClamping drops the "force" (since it is no longer a one-way switch) and renames to just overbrightClamping.

  2. Set overbright clamping on by default. If nothing else we should be true to the intentions of the authors of our own official maps, who were definitely targeting a renderer with clamping. For older maps, the .ent file may be used in restoration efforts if non-default settings look better.

1. Change cvars so that all overbright settings can easily be tested.
The current overbright-related cvars have a wonky asymmetric design that can make it impossible to test a setting without editing the map. Fix that. With this commit we can use r_overbrightDefaultExponent (0-3) and r_overbrightDefaultClamp (on/off) to control the default settings when the map doesn't say anything, and one more cvar r_overbrightIgnoreMapSettings to make those cvar values override the worldspawn values even if present. In the worldspawn entity mapOverBrightBits can stay as is, but forceLegacyOverBrightClamping drops the "force" (since it is no longer a one-way switch) and renames to just overbrightClamping.

2. Set overbright clamping on by default.
If nothing else we should be true to the intentions of the authors of our own official maps, who were definitely targeting a renderer with clamping. For older maps, the .ent file may be used in restoration efforts if non-default settings look better.

Fixes DaemonEngine#1289.
@illwieckz
Copy link
Member

illwieckz commented Oct 12, 2024

There are physical evidences that not-clamped light was the true intention of the authors, this is true for both game engine authors and map authors.

1. Game engine authors

This quote from the official Quake3 manual:

6.3.1 RgbGen identityLighting
Colors will be (1.0,1.0,1.0) if running without overbright bits (NT, linux, windowed modes), or (0.5, 0.5, 0.5) if running with overbright. Overbright allows a greater color range at the expense of a loss of precision. Additive and blended stages will get this by default.
-- https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ch05/pg5_1.htm#rgbgen

This quote is about rgbGen identityLighting which only has different values than rgbGen identity if and only if there is a need to adjust for not using a brightening alternative technique to (clamped) overbright bits that was only implemented on Windows 9x.

Actually our GLSL overbright that is done in postprocess is similar to what an hardware overbright would do, and we also have to adjust the lighting on some surfaces to compensate.

The clamped overbright is the alternative implementation for NT, Linux, and windowed Windows 9x to the overbright what was used on fullscreen Windows 9x.

2. Map authors

Those levelshots for A.T.C.S. Zone Alpha,

atcszalpha

atcszalpha

Here is how looks the map in Dæmon engine with clamped overbright:

unvanquished_2024-10-12_033608_000

Here is how looks the map in Dæmon engine without clamped overbright:

unvanquished_2024-10-12_033519_000

I haven't found the exact viewpos but -440 -365 532 -45 40 is close enough, and resolution is 720×570.

We have minor difference in blending compared to what the mapper experienced, but the lighting is what the map author expects the map to look like in 2006. Tremulous was released in 2006 as well, so this is what Tremulous players playing fullscreen on Windows 9x experienced at release time.

@slipher
Copy link
Member Author

slipher commented Oct 12, 2024

That's a cool demonstration that at least one person enjoyed a genuine overbright implementation. (And even had r_gamma 1, what a good boy!) But even in 2006, surely Windows 9x users were greatly outnumbered by users of other systems? If I'm not mistaken, Tremulous always had a substantial Linux playerbase. I suppose most mappers/players would have been working with the crippled version of overbright.

Forgot to link #1289 in the OP which contains a discussion of various people on whether we should make this the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants