Permalink
Browse files

- removed gl_light_ambient.

This really serves no use anymore and is mostly a remnant of old times with dark CRT monitors. The default ambient level was set at 20, meaning a sector light level of 40. This is a value actual levels rarely get to, except when using some lighting effects - but it's for those that the ambient clamping did the most damage.
  • Loading branch information...
Christoph Oelckers
Christoph Oelckers committed Dec 22, 2016
1 parent 98e5492 commit 36f87b7135afa27dde8e74b457bf03585402c38f
Showing with 0 additions and 12 deletions.
  1. +0 −11 src/gl/renderer/gl_lightdata.cpp
  2. +0 −1 wadsrc/static/menudef.zz
@@ -46,12 +46,6 @@ int fogdensity;
int outsidefogdensity;
int skyfog;
CUSTOM_CVAR (Int, gl_light_ambient, 20, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
// ambient of 0 does not work correctly because light level 0 is special.
if (self < 1) self = 1;
}
CVAR(Int, gl_weaponlight, 8, CVAR_ARCHIVE);
CUSTOM_CVAR(Bool, gl_enhanced_nightvision, true, CVAR_ARCHIVE|CVAR_NOINITCALL)
{
@@ -209,11 +203,6 @@ int gl_CalcLightLevel(int lightlevel, int rellight, bool weapon)
light=lightlevel;
}
if (light<gl_light_ambient && glset.lightmode != 8) // ambient clipping only if not using software lighting model.
{
light = gl_light_ambient;
if (rellight<0) rellight>>=1;
}
return clamp(light+rellight, 0, 255);
}
View
@@ -231,7 +231,6 @@ OptionMenu "GLPrefOptions"
Option "$GLPREFMNU_SPRBILLBOARD", gl_billboard_mode, "BillboardModes"
Option "$GLPREFMNU_SPRBILLFACECAMERA", gl_billboard_faces_camera, "OnOff"
Option "$GLPREFMNU_PARTICLESTYLE", gl_particles_style, "Particles"
Slider "$GLPREFMNU_AMBLIGHT", gl_light_ambient, 1.0, 255.0, 5.0
Option "$GLPREFMNU_RENDERQUALITY", gl_render_precise, "Precision"
Option "$GLPREFMNU_VRMODE", vr_mode, "VRMode"
Option "$GLPREFMNU_VRQUADSTEREO", vr_enable_quadbuffered, "OnOff"

0 comments on commit 36f87b7

Please sign in to comment.