mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-25 20:32:14 +00:00
Fixed gl1_overbrightbits limiter, for real now
Allowed values are 0, 1, 2 and 4 only. Updated documentation, again.
This commit is contained in:
parent
9f9c212648
commit
fb46007bc3
3 changed files with 14 additions and 8 deletions
|
@ -453,9 +453,8 @@ Set `0` by default.
|
|||
* **gl1_overbrightbits**: Enables overbright bits, brightness scaling of
|
||||
lightmaps and models. Higher values make shadows less dark. Possible
|
||||
values are `0` (no overbright bits), `1` (more correct lighting for
|
||||
water), `2` (scale by factor 2), `3` (scale lighting by 3 only for the
|
||||
dynamic meshes, like enemies and items), and `4` (scale lighting of
|
||||
everything by 4). Applied in realtime, does not need `vid_restart`.
|
||||
liquids), `2` (scale lighting by factor 2), and `4` (scale by factor
|
||||
4). Applied in realtime, does not need `vid_restart`.
|
||||
|
||||
* **gl1_particle_square**: If set to `1` particles are rendered as
|
||||
squares.
|
||||
|
|
|
@ -582,7 +582,7 @@ VID_MenuInit(void)
|
|||
s_gl1_overbrightbits_slider.generic.y = (y += 10);
|
||||
s_gl1_overbrightbits_slider.cvar = "gl1_overbrightbits";
|
||||
s_gl1_overbrightbits_slider.minvalue = 0;
|
||||
s_gl1_overbrightbits_slider.maxvalue = 3;
|
||||
s_gl1_overbrightbits_slider.maxvalue = 2;
|
||||
s_gl1_overbrightbits_slider.slidestep = 1;
|
||||
s_gl1_overbrightbits_slider.printformat = "%.0f";
|
||||
|
||||
|
|
|
@ -1620,15 +1620,22 @@ RI_BeginFrame(float camera_separation)
|
|||
// Clamp overbrightbits
|
||||
if (gl1_overbrightbits->modified)
|
||||
{
|
||||
if (gl1_overbrightbits->value < 0)
|
||||
int obb_val = (int)gl1_overbrightbits->value;
|
||||
|
||||
if (obb_val < 0)
|
||||
{
|
||||
ri.Cvar_Set("gl1_overbrightbits", "0");
|
||||
obb_val = 0;
|
||||
}
|
||||
else if (gl1_overbrightbits->value > 4)
|
||||
else if (obb_val == 3)
|
||||
{
|
||||
ri.Cvar_Set("gl1_overbrightbits", "4");
|
||||
obb_val = 2;
|
||||
}
|
||||
else if (obb_val > 4)
|
||||
{
|
||||
obb_val = 4;
|
||||
}
|
||||
|
||||
ri.Cvar_SetValue("gl1_overbrightbits", obb_val);
|
||||
gl1_overbrightbits->modified = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue