mirror of
https://github.com/nzp-team/glquake.git
synced 2025-02-11 10:11:20 +00:00
Non-transparent texture fullbright display fix
This commit is contained in:
parent
05d82bc901
commit
f4528b18be
3 changed files with 6 additions and 1 deletions
BIN
nzportable.3dsx
BIN
nzportable.3dsx
Binary file not shown.
BIN
nzportable.elf
BIN
nzportable.elf
Binary file not shown.
|
@ -1233,6 +1233,7 @@ void R_DrawBrushModel (entity_t *e)
|
||||||
//
|
//
|
||||||
// draw texture
|
// draw texture
|
||||||
//
|
//
|
||||||
|
int touched_transparent = 0; // naievil -- wow I cannot believe this works, fixes rendering on non transparent textures
|
||||||
for (i=0 ; i<clmodel->nummodelsurfaces ; i++, psurf++)
|
for (i=0 ; i<clmodel->nummodelsurfaces ; i++, psurf++)
|
||||||
{
|
{
|
||||||
// find which side of the node we are on
|
// find which side of the node we are on
|
||||||
|
@ -1240,6 +1241,10 @@ void R_DrawBrushModel (entity_t *e)
|
||||||
|
|
||||||
dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
|
dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
|
||||||
|
|
||||||
|
if (!strncmp(psurf->texinfo->texture->name,"{",1)) {
|
||||||
|
touched_transparent = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// draw the polygon
|
// draw the polygon
|
||||||
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
||||||
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
|
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
|
||||||
|
@ -1248,7 +1253,7 @@ void R_DrawBrushModel (entity_t *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
R_BlendLightmaps (1);
|
R_BlendLightmaps (touched_transparent);
|
||||||
|
|
||||||
glPopMatrix ();
|
glPopMatrix ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue