mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 21:51:09 +00:00
- removed gl_lights_size and gl_lights_intensity.
Both of these were inherited from ZDoomGL and in terms of light design in maps it makes absolutely no sense to have them user configurable. They should have been removed 11 years ago.
This commit is contained in:
parent
e7856ce1e3
commit
8b01a88b76
8 changed files with 15 additions and 24 deletions
|
@ -386,7 +386,7 @@ bool gl_SetupLight(int group, Plane & p, ADynamicLight * light, Vector & nearPt,
|
|||
DVector3 lpos = light->PosRelative(group);
|
||||
|
||||
float dist = fabsf(p.DistToPoint(lpos.X, lpos.Z, lpos.Y));
|
||||
float radius = (light->GetRadius() * gl_lights_size);
|
||||
float radius = light->GetRadius();
|
||||
|
||||
if (radius <= 0.f) return false;
|
||||
if (dist > radius) return false;
|
||||
|
@ -417,9 +417,9 @@ bool gl_SetupLight(int group, Plane & p, ADynamicLight * light, Vector & nearPt,
|
|||
|
||||
float cs = 1.0f - (dist / radius);
|
||||
if (additive) cs *= 0.2f; // otherwise the light gets too strong.
|
||||
float r = light->GetRed() / 255.0f * cs * gl_lights_intensity;
|
||||
float g = light->GetGreen() / 255.0f * cs * gl_lights_intensity;
|
||||
float b = light->GetBlue() / 255.0f * cs * gl_lights_intensity;
|
||||
float r = light->GetRed() / 255.0f * cs;
|
||||
float g = light->GetGreen() / 255.0f * cs;
|
||||
float b = light->GetBlue() / 255.0f * cs;
|
||||
|
||||
if (light->IsSubtractive())
|
||||
{
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "gl/utility/gl_convert.h"
|
||||
#include "gl/utility/gl_templates.h"
|
||||
|
||||
EXTERN_CVAR (Float, gl_lights_size);
|
||||
EXTERN_CVAR(Int, vid_renderer)
|
||||
|
||||
|
||||
|
@ -378,7 +377,7 @@ void ADynamicLight::UpdateLocation()
|
|||
{
|
||||
intensity = m_currentRadius;
|
||||
}
|
||||
radius = intensity * 2.0f * gl_lights_size;
|
||||
radius = intensity * 2.0f;
|
||||
|
||||
if (X() != oldx || Y() != oldy || radius != oldradius)
|
||||
{
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
#include "gl/utility/gl_clock.h"
|
||||
#include "gl/utility/gl_convert.h"
|
||||
|
||||
EXTERN_CVAR (Float, gl_lights_intensity);
|
||||
EXTERN_CVAR (Float, gl_lights_size);
|
||||
int ScriptDepth;
|
||||
void gl_InitGlow(FScanner &sc);
|
||||
void gl_ParseBrightmap(FScanner &sc, int);
|
||||
|
@ -175,7 +173,7 @@ void FLightDefaults::ApplyProperties(ADynamicLight * light) const
|
|||
light->Angles.Yaw.Degrees = m_Param;
|
||||
light->SetOffset(m_Pos);
|
||||
light->halo = m_halo;
|
||||
for (int a = 0; a < 3; a++) light->args[a] = clamp<int>((int)(m_Args[a] * gl_lights_intensity), 0, 255);
|
||||
for (int a = 0; a < 3; a++) light->args[a] = clamp<int>((int)(m_Args[a]), 0, 255);
|
||||
light->m_Radius[0] = int(m_Args[LIGHT_INTENSITY]);
|
||||
light->m_Radius[1] = int(m_Args[LIGHT_SECONDARY_INTENSITY]);
|
||||
light->flags4 &= ~(MF4_ADDITIVE | MF4_SUBTRACTIVE | MF4_DONTLIGHTSELF);
|
||||
|
|
|
@ -70,8 +70,6 @@ CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
|
|||
|
||||
CVAR (Bool, gl_attachedlights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, gl_lights_checkside, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||
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);
|
||||
|
||||
|
@ -87,7 +85,7 @@ bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FD
|
|||
DVector3 pos = light->PosRelative(group);
|
||||
|
||||
float dist = fabsf(p.DistToPoint(pos.X, pos.Z, pos.Y));
|
||||
float radius = (light->GetRadius() * gl_lights_size);
|
||||
float radius = (light->GetRadius());
|
||||
|
||||
if (radius <= 0.f) return false;
|
||||
if (dist > radius) return false;
|
||||
|
@ -108,9 +106,9 @@ bool gl_GetLight(int group, Plane & p, ADynamicLight * light, bool checkside, FD
|
|||
cs = 1.0f;
|
||||
}
|
||||
|
||||
float r = light->GetRed() / 255.0f * cs * gl_lights_intensity;
|
||||
float g = light->GetGreen() / 255.0f * cs * gl_lights_intensity;
|
||||
float b = light->GetBlue() / 255.0f * cs * gl_lights_intensity;
|
||||
float r = light->GetRed() / 255.0f * cs;
|
||||
float g = light->GetGreen() / 255.0f * cs;
|
||||
float b = light->GetBlue() / 255.0f * cs;
|
||||
|
||||
if (light->IsSubtractive())
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ void gl_SetDynSpriteLight(AActor *self, float x, float y, float z, subsector_t *
|
|||
dist = FVector3(x - light->X(), y - light->Y(), z - light->Z()).LengthSquared();
|
||||
}
|
||||
|
||||
radius = light->GetRadius() * gl_lights_size;
|
||||
radius = light->GetRadius();
|
||||
|
||||
if (dist < radius * radius)
|
||||
{
|
||||
|
@ -106,9 +106,9 @@ void gl_SetDynSpriteLight(AActor *self, float x, float y, float z, subsector_t *
|
|||
|
||||
if (frac > 0)
|
||||
{
|
||||
lr = light->GetRed() / 255.0f * gl_lights_intensity;
|
||||
lg = light->GetGreen() / 255.0f * gl_lights_intensity;
|
||||
lb = light->GetBlue() / 255.0f * gl_lights_intensity;
|
||||
lr = light->GetRed() / 255.0f;
|
||||
lg = light->GetGreen() / 255.0f;
|
||||
lb = light->GetBlue() / 255.0f;
|
||||
if (light->IsSubtractive())
|
||||
{
|
||||
float bright = FVector3(lr, lg, lb).Length();
|
||||
|
|
|
@ -124,7 +124,7 @@ void GLWall::SetupLights()
|
|||
float y = node->lightsource->Y();
|
||||
float z = node->lightsource->Z();
|
||||
float dist = fabsf(p.DistToPoint(x, z, y));
|
||||
float radius = (node->lightsource->GetRadius() * gl_lights_size);
|
||||
float radius = node->lightsource->GetRadius();
|
||||
float scale = 1.0f / ((2.f * radius) - dist);
|
||||
|
||||
if (radius > 0.f && dist < radius)
|
||||
|
|
|
@ -24,8 +24,6 @@ EXTERN_CVAR(Int, gl_weaponlight)
|
|||
EXTERN_CVAR (Bool, gl_lights);
|
||||
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_light_sprites);
|
||||
EXTERN_CVAR (Bool, gl_light_particles);
|
||||
|
||||
|
|
|
@ -198,8 +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"
|
||||
Slider "$GLLIGHTMNU_LIGHTINTENSITY", gl_lights_intensity, 0.0, 1.0, 0.1
|
||||
Slider "$GLLIGHTMNU_LIGHTSIZE", gl_lights_size, 0.0, 2.0, 0.1
|
||||
}
|
||||
|
||||
OptionMenu "GLPrefOptions"
|
||||
|
|
Loading…
Reference in a new issue