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:
Yamagi Burmeister 2016-08-07 10:39:22 +02:00
parent f8ac496b69
commit 347cdb7f81
2 changed files with 10 additions and 12 deletions

View file

@ -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)
{

View file

@ -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);
}
}