mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
renders: skip SURF_NODRAW surfaces
Cheked with remaster psx/base0 map
This commit is contained in:
parent
6fd9e0ecc4
commit
c3638d6c9a
6 changed files with 30 additions and 2 deletions
|
@ -1090,6 +1090,11 @@ R_RecursiveWorldNode(entity_t *currententity, mnode_t *node)
|
|||
r_alpha_surfaces = surf;
|
||||
r_alpha_surfaces->texinfo->image = R_TextureAnimation(currententity, surf->texinfo);
|
||||
}
|
||||
else if (surf->texinfo->flags & SURF_NODRAW)
|
||||
{
|
||||
/* Surface should be skipped */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* the polygon is visible, so add it to the texture sorted chain */
|
||||
|
|
|
@ -729,6 +729,11 @@ RecursiveWorldNode(entity_t *currententity, mnode_t *node)
|
|||
gl3_alpha_surfaces = surf;
|
||||
gl3_alpha_surfaces->texinfo->image = R_TextureAnimation(currententity, surf->texinfo);
|
||||
}
|
||||
else if (surf->texinfo->flags & SURF_NODRAW)
|
||||
{
|
||||
/* Surface should be skipped */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// calling RenderLightmappedPoly() here probably isn't optimal, rendering everything
|
||||
|
|
|
@ -726,6 +726,11 @@ RecursiveWorldNode(entity_t *currententity, mnode_t *node)
|
|||
gl4_alpha_surfaces = surf;
|
||||
gl4_alpha_surfaces->texinfo->image = R_TextureAnimation(currententity, surf->texinfo);
|
||||
}
|
||||
else if (surf->texinfo->flags & SURF_NODRAW)
|
||||
{
|
||||
/* Surface should be skipped */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// calling RenderLightmappedPoly() here probably isn't optimal, rendering everything
|
||||
|
|
|
@ -322,7 +322,7 @@ R_DrawSolidClippedSubmodelPolygons(entity_t *currententity, const model_t *curre
|
|||
numsurfaces = currentmodel->nummodelsurfaces;
|
||||
pedges = currentmodel->edges;
|
||||
|
||||
for (i=0 ; i<numsurfaces ; i++, psurf++)
|
||||
for (i = 0; i < numsurfaces; i++, psurf++)
|
||||
{
|
||||
cplane_t *pplane;
|
||||
bedge_t *pbedge;
|
||||
|
@ -337,7 +337,9 @@ R_DrawSolidClippedSubmodelPolygons(entity_t *currententity, const model_t *curre
|
|||
// draw the polygon
|
||||
if (( !(psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
||||
((psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// FIXME: use bounding-box-based frustum clipping info?
|
||||
|
||||
|
@ -349,7 +351,7 @@ R_DrawSolidClippedSubmodelPolygons(entity_t *currententity, const model_t *curre
|
|||
pbedge = &bedges[numbedges];
|
||||
numbedges += psurf->numedges;
|
||||
|
||||
for (j=0 ; j<psurf->numedges ; j++)
|
||||
for (j = 0; j < psurf->numedges; j++)
|
||||
{
|
||||
int lindex;
|
||||
|
||||
|
|
|
@ -536,6 +536,12 @@ R_RenderFace (entity_t *currententity, const model_t *currentmodel, msurface_t *
|
|||
return;
|
||||
}
|
||||
|
||||
if (fa->texinfo->flags & SURF_NODRAW)
|
||||
{
|
||||
/* Surface should be skipped */
|
||||
return;
|
||||
}
|
||||
|
||||
// sky surfaces encountered in the world will cause the
|
||||
// environment box surfaces to be emited
|
||||
if ( fa->texinfo->flags & SURF_SKY )
|
||||
|
|
|
@ -740,6 +740,11 @@ R_RecursiveWorldNode(entity_t *currententity, mnode_t *node)
|
|||
surf->texturechain = r_alpha_surfaces;
|
||||
r_alpha_surfaces = surf;
|
||||
}
|
||||
else if (surf->texinfo->flags & SURF_NODRAW)
|
||||
{
|
||||
/* Surface should be skipped */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(surf->flags & SURF_DRAWTURB) && !r_showtris->value)
|
||||
|
|
Loading…
Reference in a new issue