Daemon
Daemon copied to clipboard
Disable overbright by default + make fully configurable
-
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.
-
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.
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,
map-atcszalpha.pk3:levelshots/atcszalpha.jpg, file date2006-09-02 14:09:30:
map-atcszalpha-b1.pk3:levelshots/atcszalpha.jpg, file date2006-09-08 19:11:56:
Here is how looks the map in Dæmon engine with clamped overbright:
Here is how looks the map in Dæmon engine without clamped overbright:
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.
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.