mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-31 23:41:25 +00:00
Some more fixes to gl_overbrightbits in non multitexturing case.
- Apply overbright bits only to static lightmaps and not dynamic ones. - Apply overbright bits to alias models.
This commit is contained in:
parent
f8ac496b69
commit
347cdb7f81
2 changed files with 10 additions and 12 deletions
|
@ -624,11 +624,8 @@ 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. Also note that gl_overbrightbits is only applied to walls when gl_mtexcombine is set to 1,
|
||||
so we'll also want to check that; otherwise we'll end up in the reverse situation and the meshes will
|
||||
appear too bright. */
|
||||
if (gl_config.mtexcombine && gl_overbrightbits->value)
|
||||
// Apply gl_overbrightbits to the mesh. If we don't do this they will appear slightly dimmer relative to walls.
|
||||
if (gl_overbrightbits->value)
|
||||
{
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
|
|
|
@ -226,13 +226,6 @@ R_DrawGLPolyChain(glpoly_t *p, float soffset, float toffset)
|
|||
|
||||
v = p->verts [ 0 ];
|
||||
|
||||
if (gl_overbrightbits->value)
|
||||
{
|
||||
R_TexEnv(GL_COMBINE_EXT);
|
||||
R_SelectTexture(GL_TEXTURE1);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl_overbrightbits->value);
|
||||
}
|
||||
|
||||
glEnableClientState( GL_VERTEX_ARRAY );
|
||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||
|
||||
|
@ -309,6 +302,14 @@ R_BlendLightmaps(void)
|
|||
{
|
||||
if (surf->polys)
|
||||
{
|
||||
// Apply overbright bits to the static lightmaps
|
||||
if (gl_overbrightbits->value)
|
||||
{
|
||||
R_TexEnv(GL_COMBINE_EXT);
|
||||
R_SelectTexture(GL_TEXTURE1);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, gl_overbrightbits->value);
|
||||
}
|
||||
|
||||
R_DrawGLPolyChain(surf->polys, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue