mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- removed unused forceadditive parameter from gl_GetLight.
- restricted gl_lights_additive to legacy code and removed menu entry for this. For modern hardware this setting is completely pointless, it offers no advantage and degrades visual quality. Its only reason for existence was that drawing additive lights with textures is a lot faster, and that's all it's being used for now.
This commit is contained in:
parent
37d0f97808
commit
e7856ce1e3
8 changed files with 8 additions and 14 deletions
|
@ -57,6 +57,8 @@
|
|||
#include "gl/data/gl_vertexbuffer.h"
|
||||
|
||||
|
||||
CVAR(Bool, gl_lights_additive, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Do some tinkering with the menus so that certain options only appear
|
||||
|
@ -478,7 +480,7 @@ bool GLWall::PutWallCompat(int passflag)
|
|||
if (sub->lighthead == nullptr) return false;
|
||||
}
|
||||
|
||||
bool foggy = !gl_isBlack(Colormap.FadeColor) || (level.flags&LEVEL_HASFADETABLE) || gl_lights_additive;
|
||||
bool foggy = gl_CheckFog(&Colormap, lightlevel) || (level.flags&LEVEL_HASFADETABLE) || gl_lights_additive;
|
||||
bool masked = passflag == 2 && gltexture->isMasked();
|
||||
|
||||
int list = list_indices[masked][foggy];
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
#include "gl/utility/gl_templates.h"
|
||||
|
||||
EXTERN_CVAR (Float, gl_lights_size);
|
||||
EXTERN_CVAR (Bool, gl_lights_additive);
|
||||
EXTERN_CVAR(Int, vid_renderer)
|
||||
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ struct FDynLightData
|
|||
|
||||
|
||||
|
||||
bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, bool forceadditive, FDynLightData &data);
|
||||
bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FDynLightData &data);
|
||||
void gl_UploadLights(FDynLightData &data);
|
||||
|
||||
|
||||
|
|
|
@ -74,18 +74,13 @@ CVAR (Float, gl_lights_intensity, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
|||
CVAR (Float, gl_lights_size, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, gl_light_sprites, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, gl_light_particles, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
CUSTOM_CVAR (Bool, gl_lights_additive, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
gl_DeleteAllAttachedLights();
|
||||
gl_RecreateAllAttachedLights();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Sets up the parameters to render one dynamic light onto one plane
|
||||
//
|
||||
//==========================================================================
|
||||
bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, bool forceadditive, FDynLightData &ldata)
|
||||
bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FDynLightData &ldata)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
@ -103,7 +98,7 @@ bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, bo
|
|||
|
||||
|
||||
float cs;
|
||||
if (gl_lights_additive || light->flags4&MF4_ADDITIVE || forceadditive)
|
||||
if (light->IsAdditive())
|
||||
{
|
||||
cs = 0.2f;
|
||||
i = 2;
|
||||
|
|
|
@ -154,7 +154,7 @@ void GLFlat::SetupSubsectorLights(int pass, subsector_t * sub, int *dli)
|
|||
}
|
||||
|
||||
p.Set(plane.plane);
|
||||
gl_GetLight(sub->sector->PortalGroup, p, light, false, false, lightdata);
|
||||
gl_GetLight(sub->sector->PortalGroup, p, light, false, lightdata);
|
||||
node = node->nextLight;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ void GLWall::SetupLights()
|
|||
}
|
||||
if (outcnt[0]!=4 && outcnt[1]!=4 && outcnt[2]!=4 && outcnt[3]!=4)
|
||||
{
|
||||
gl_GetLight(seg->frontsector->PortalGroup, p, node->lightsource, true, false, lightdata);
|
||||
gl_GetLight(seg->frontsector->PortalGroup, p, node->lightsource, true, lightdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ EXTERN_CVAR (Bool, gl_attachedlights);
|
|||
EXTERN_CVAR (Bool, gl_lights_checkside);
|
||||
EXTERN_CVAR (Float, gl_lights_intensity);
|
||||
EXTERN_CVAR (Float, gl_lights_size);
|
||||
EXTERN_CVAR (Bool, gl_lights_additive);
|
||||
EXTERN_CVAR (Bool, gl_light_sprites);
|
||||
EXTERN_CVAR (Bool, gl_light_particles);
|
||||
|
||||
|
|
|
@ -198,7 +198,6 @@ OptionMenu "GLLightOptions"
|
|||
Option "$GLLIGHTMNU_CLIPLIGHTS", gl_lights_checkside, "YesNo"
|
||||
Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo"
|
||||
Option "$GLLIGHTMNU_LIGHTPARTICLES", gl_light_particles, "YesNo"
|
||||
Option "$GLLIGHTMNU_FORCEADDITIVE", gl_lights_additive, "YesNo"
|
||||
Slider "$GLLIGHTMNU_LIGHTINTENSITY", gl_lights_intensity, 0.0, 1.0, 0.1
|
||||
Slider "$GLLIGHTMNU_LIGHTSIZE", gl_lights_size, 0.0, 2.0, 0.1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue