Skip to content

Commit d68d79d

Browse files
committed
Remove obsolete comment about overbright
There's an up-to-date one in R_InitImages().
1 parent 97c49b3 commit d68d79d

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

src/engine/renderer/tr_bsp.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -47,50 +47,8 @@ R_ColorShiftLightingBytes
4747
*/
4848
static void R_ColorShiftLightingBytes( byte bytes[ 4 ] )
4949
{
50-
/* This implementation is strongly buggy as for every shift bit, the max light
51-
is clamped by one bit and then divided by two, the stronger the light factor is,
52-
the more the light is clamped.
53-
54-
The Q3Radiant Shader Manual said:
55-
> Colors will be (1.0,1.0,1.0) if running without overbright bits
56-
> (NT, linux, windowed modes), or (0.5, 0.5, 0.5) if running with
57-
> overbright.
58-
> -- https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ch05/pg5_1.htm
59-
60-
In this sentence, “running with overbright” is about using hardware
61-
overbright, and “running without overbright” is about using this function.
62-
63-
This means Quake III Arena was only supporting hardware overbright
64-
on pre-NT Windows 9x systems when fullscreen, and running this buggy
65-
code on every other platforms and when windowed.
66-
67-
Debugging regressions from Tremulous and other Quake 3 or Wolf:ET derivated games
68-
in legacy features unrelated to lighting overbright may require to temporarily
69-
re-enable such buggy clamping to keep a fair comparison and avoid reimplementing
70-
some clamping in an attempt to get a 1:1 comparison while not running a code not
71-
backward compatible with legacy bugs.
72-
73-
This function is then kept to provide the ability to load map with a renderer
74-
backward compatible with this bug for diagnostic purpose and fair comparison with
75-
other buggy engines. */
76-
7750
ASSERT_LT( tr.overbrightBits, tr.mapOverBrightBits );
7851

79-
/* Shift the color data based on overbright range.
80-
81-
Historically the shift was:
82-
83-
shift = tr.mapOverBrightBits - tr.overbrightBits;
84-
85-
But in Dæmon engine tr.overbrightBits is always zero
86-
as this value is zero when there hardware overbright
87-
bit is disabled, and the engine doesn't implement
88-
hardware overbright bit at all.
89-
90-
The original code was there to only shift in software
91-
what hardware overbright bit feature was not doing, but
92-
this implementation is entirely software. */
93-
9452
int shift = tr.mapOverBrightBits - tr.overbrightBits;
9553

9654
// shift the data based on overbright range

src/engine/renderer/tr_image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3113,7 +3113,7 @@ void R_InitImages()
31133113
CGEN_IDENTITY_LIGHTING to multiply by tr.identityLight, which would cancel out the
31143114
rescaling so that the material looked the same regardless of tr.overbrightBits.
31153115
3116-
In Daemon tr.identityLight is usually 1, so any distincion between
3116+
In Daemon tr.identityLight is usually 1, so any distinction between
31173117
CGEN_IDENTITY/CGEN_IDENTITY_LIGHTING is ignored. But if you set the cvar r_overbrightQ3,
31183118
which emulates Quake 3's technique of brightening the whole color buffer, it will be used.
31193119

0 commit comments

Comments
 (0)