@@ -47,50 +47,8 @@ R_ColorShiftLightingBytes
47
47
*/
48
48
static void R_ColorShiftLightingBytes ( byte bytes[ 4 ] )
49
49
{
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
-
77
50
ASSERT_LT ( tr.overbrightBits , tr.mapOverBrightBits );
78
51
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
-
94
52
int shift = tr.mapOverBrightBits - tr.overbrightBits ;
95
53
96
54
// shift the data based on overbright range
0 commit comments