mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Rename gl_overbrightbits to gl1_overbrightbits.
This commit is contained in:
parent
526904ca03
commit
f0c4b4fd14
8 changed files with 26 additions and 25 deletions
|
@ -175,7 +175,7 @@ extern cvar_t *r_novis;
|
||||||
extern cvar_t *r_lerpmodels;
|
extern cvar_t *r_lerpmodels;
|
||||||
|
|
||||||
extern cvar_t *r_lightlevel;
|
extern cvar_t *r_lightlevel;
|
||||||
extern cvar_t *gl_overbrightbits;
|
extern cvar_t *gl1_overbrightbits;
|
||||||
|
|
||||||
extern cvar_t *gl_palettedtexture;
|
extern cvar_t *gl_palettedtexture;
|
||||||
extern cvar_t *gl_pointparameters;
|
extern cvar_t *gl_pointparameters;
|
||||||
|
|
|
@ -80,7 +80,7 @@ cvar_t *gl_lefthand;
|
||||||
cvar_t *r_farsee;
|
cvar_t *r_farsee;
|
||||||
|
|
||||||
cvar_t *r_lightlevel;
|
cvar_t *r_lightlevel;
|
||||||
cvar_t *gl_overbrightbits;
|
cvar_t *gl1_overbrightbits;
|
||||||
|
|
||||||
cvar_t *gl_particle_min_size;
|
cvar_t *gl_particle_min_size;
|
||||||
cvar_t *gl_particle_max_size;
|
cvar_t *gl_particle_max_size;
|
||||||
|
@ -1209,7 +1209,7 @@ R_Register(void)
|
||||||
r_speeds = ri.Cvar_Get("r_speeds", "0", 0);
|
r_speeds = ri.Cvar_Get("r_speeds", "0", 0);
|
||||||
|
|
||||||
r_lightlevel = ri.Cvar_Get("r_lightlevel", "0", 0);
|
r_lightlevel = ri.Cvar_Get("r_lightlevel", "0", 0);
|
||||||
gl_overbrightbits = ri.Cvar_Get("gl_overbrightbits", "0", CVAR_ARCHIVE);
|
gl1_overbrightbits = ri.Cvar_Get("gl1_overbrightbits", "0", CVAR_ARCHIVE);
|
||||||
|
|
||||||
gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
|
gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
|
||||||
gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
|
gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
|
||||||
|
@ -1631,18 +1631,18 @@ RI_BeginFrame(float camera_separation)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clamp overbrightbits
|
// Clamp overbrightbits
|
||||||
if (gl_overbrightbits->modified)
|
if (gl1_overbrightbits->modified)
|
||||||
{
|
{
|
||||||
if (gl_overbrightbits->value > 2 && gl_overbrightbits->value < 4)
|
if (gl1_overbrightbits->value > 2 && gl1_overbrightbits->value < 4)
|
||||||
{
|
{
|
||||||
ri.Cvar_Set("gl_overbrightbits", "2");
|
ri.Cvar_Set("r_overbrightbits", "2");
|
||||||
}
|
}
|
||||||
else if (gl_overbrightbits->value > 4)
|
else if (gl1_overbrightbits->value > 4)
|
||||||
{
|
{
|
||||||
ri.Cvar_Set("gl_overbrightbits", "4");
|
ri.Cvar_Set("r_overbrightbits", "4");
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_overbrightbits->modified = false;
|
gl1_overbrightbits->modified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* go into 2D mode */
|
/* go into 2D mode */
|
||||||
|
|
|
@ -624,12 +624,12 @@ R_DrawAliasModel(entity_t *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Apply gl_overbrightbits to the mesh. If we don't do this they will appear slightly dimmer relative to walls.
|
// Apply gl1_overbrightbits to the mesh. If we don't do this they will appear slightly dimmer relative to walls.
|
||||||
if (gl_overbrightbits->value)
|
if (gl1_overbrightbits->value)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
shadelight[i] *= gl_overbrightbits->value;
|
shadelight[i] *= gl1_overbrightbits->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,10 +304,10 @@ R_BlendLightmaps(void)
|
||||||
if (surf->polys)
|
if (surf->polys)
|
||||||
{
|
{
|
||||||
// Apply overbright bits to the static lightmaps
|
// Apply overbright bits to the static lightmaps
|
||||||
if (gl_overbrightbits->value)
|
if (gl1_overbrightbits->value)
|
||||||
{
|
{
|
||||||
R_TexEnv(GL_COMBINE_EXT);
|
R_TexEnv(GL_COMBINE_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl_overbrightbits->value);
|
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl1_overbrightbits->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
R_DrawGLPolyChain(surf->polys, 0, 0);
|
R_DrawGLPolyChain(surf->polys, 0, 0);
|
||||||
|
@ -363,10 +363,10 @@ R_BlendLightmaps(void)
|
||||||
if (drawsurf->polys)
|
if (drawsurf->polys)
|
||||||
{
|
{
|
||||||
// Apply overbright bits to the dynamic lightmaps
|
// Apply overbright bits to the dynamic lightmaps
|
||||||
if (gl_overbrightbits->value)
|
if (gl1_overbrightbits->value)
|
||||||
{
|
{
|
||||||
R_TexEnv(GL_COMBINE_EXT);
|
R_TexEnv(GL_COMBINE_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl_overbrightbits->value);
|
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl1_overbrightbits->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
R_DrawGLPolyChain(drawsurf->polys,
|
R_DrawGLPolyChain(drawsurf->polys,
|
||||||
|
@ -407,10 +407,10 @@ R_BlendLightmaps(void)
|
||||||
if (surf->polys)
|
if (surf->polys)
|
||||||
{
|
{
|
||||||
// Apply overbright bits to the remainder lightmaps
|
// Apply overbright bits to the remainder lightmaps
|
||||||
if (gl_overbrightbits->value)
|
if (gl1_overbrightbits->value)
|
||||||
{
|
{
|
||||||
R_TexEnv(GL_COMBINE_EXT);
|
R_TexEnv(GL_COMBINE_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl_overbrightbits->value);
|
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl1_overbrightbits->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
R_DrawGLPolyChain(surf->polys,
|
R_DrawGLPolyChain(surf->polys,
|
||||||
|
@ -447,14 +447,14 @@ R_RenderBrushPoly(msurface_t *fa)
|
||||||
would show up much too bright. When we implemented overbright bits this
|
would show up much too bright. When we implemented overbright bits this
|
||||||
hack modified the global GL state in an incompatible way. So implement
|
hack modified the global GL state in an incompatible way. So implement
|
||||||
a new hack, based on overbright bits... Depending on the value set to
|
a new hack, based on overbright bits... Depending on the value set to
|
||||||
gl_overbrightbits the result is different:
|
gl1_overbrightbits the result is different:
|
||||||
|
|
||||||
0: Old behaviour.
|
0: Old behaviour.
|
||||||
1: No overbright bits on the global scene but correct lightning on
|
1: No overbright bits on the global scene but correct lightning on
|
||||||
warping surfaces.
|
warping surfaces.
|
||||||
2: Overbright bits on the global scene but not on warping surfaces.
|
2: Overbright bits on the global scene but not on warping surfaces.
|
||||||
They oversaturate otherwise. */
|
They oversaturate otherwise. */
|
||||||
if (gl_overbrightbits->value)
|
if (gl1_overbrightbits->value)
|
||||||
{
|
{
|
||||||
R_TexEnv(GL_COMBINE_EXT);
|
R_TexEnv(GL_COMBINE_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1);
|
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1);
|
||||||
|
|
|
@ -1648,7 +1648,7 @@ GL3_BeginFrame(float camera_separation)
|
||||||
|
|
||||||
if(gl3_overbrightbits->value < 0.0f)
|
if(gl3_overbrightbits->value < 0.0f)
|
||||||
{
|
{
|
||||||
ri.Cvar_Set("gl_overbrightbits", "0");
|
ri.Cvar_Set("gl3_overbrightbits", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
gl3state.uni3DData.overbrightbits = (gl3_overbrightbits->value <= 0.0f) ? 1.0f : gl3_overbrightbits->value;
|
gl3state.uni3DData.overbrightbits = (gl3_overbrightbits->value <= 0.0f) ? 1.0f : gl3_overbrightbits->value;
|
||||||
|
|
|
@ -972,7 +972,7 @@ static void initUBOs(void)
|
||||||
gl3state.uni3DData.scroll = 0.0f;
|
gl3state.uni3DData.scroll = 0.0f;
|
||||||
gl3state.uni3DData.time = 0.0f;
|
gl3state.uni3DData.time = 0.0f;
|
||||||
gl3state.uni3DData.alpha = 1.0f;
|
gl3state.uni3DData.alpha = 1.0f;
|
||||||
// gl_overbrightbits 0 means "no scaling" which is equivalent to multiplying with 1
|
// gl3_overbrightbits 0 means "no scaling" which is equivalent to multiplying with 1
|
||||||
gl3state.uni3DData.overbrightbits = (gl3_overbrightbits->value <= 0.0f) ? 1.0f : gl3_overbrightbits->value;
|
gl3state.uni3DData.overbrightbits = (gl3_overbrightbits->value <= 0.0f) ? 1.0f : gl3_overbrightbits->value;
|
||||||
gl3state.uni3DData.particleFadeFactor = gl3_particle_fade_factor->value;
|
gl3state.uni3DData.particleFadeFactor = gl3_particle_fade_factor->value;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,8 @@ replacement_t replacements[] = {
|
||||||
{"gl_lockpvs", "r_lockpvs"},
|
{"gl_lockpvs", "r_lockpvs"},
|
||||||
{"gl_maxfps", "vid_maxfps"},
|
{"gl_maxfps", "vid_maxfps"},
|
||||||
{"gl_mode", "r_mode"},
|
{"gl_mode", "r_mode"},
|
||||||
{"gl_modulate", "r_modulate"}
|
{"gl_modulate", "r_modulate"},
|
||||||
|
{"gl_overbrightbits", "gl1_overbrightbits"}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ Graphics (GL1 only):
|
||||||
Must be a floating point value, at least `1.0` - default is `2.0`.
|
Must be a floating point value, at least `1.0` - default is `2.0`.
|
||||||
Applied when textures are loaded, so it needs a `vid_restart`!
|
Applied when textures are loaded, so it needs a `vid_restart`!
|
||||||
|
|
||||||
* **gl_overbrightbits**: Enables overbright bits, brightness scaling of
|
* **gl1_overbrightbits**: Enables overbright bits, brightness scaling of
|
||||||
lightmaps and models. Higher values make shadows less dark.
|
lightmaps and models. Higher values make shadows less dark.
|
||||||
Possible values are `0` (no overbright bits), `1` (correct lighting
|
Possible values are `0` (no overbright bits), `1` (correct lighting
|
||||||
for water), `2` (scale by factor 2) and `3` (scale by factor 3).
|
for water), `2` (scale by factor 2) and `3` (scale by factor 3).
|
||||||
|
@ -184,7 +184,7 @@ Graphics (GL3 only):
|
||||||
|
|
||||||
* **gl3_overbrightbits**: Enables overbright bits, brightness scaling of
|
* **gl3_overbrightbits**: Enables overbright bits, brightness scaling of
|
||||||
lightmaps and models. Higher values make shadows less dark.
|
lightmaps and models. Higher values make shadows less dark.
|
||||||
Similar to GL1's `gl_overbrightbits`, but allows any floating point number.
|
Similar to GL1's `gl1_overbrightbits`, but allows any floating point number.
|
||||||
Default is `1.3`. In the OpenGL3.2 renderer, no lighting fixes for water
|
Default is `1.3`. In the OpenGL3.2 renderer, no lighting fixes for water
|
||||||
are needed, so `1.0` has no special meaning.
|
are needed, so `1.0` has no special meaning.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue