for (portal = model->brush.data_leafs[leafnum].portals;portal;portal = portal->next)
{
if (portal->numpoints <= POLYGONELEMENTS_MAXPOINTS)
- if (!R_CullBox(portal->mins, portal->maxs))
+ if (!R_CullFrustum(portal->mins, portal->maxs))
{
VectorClear(center);
for (i = 0;i < portal->numpoints;i++)
{
if (surfacevisible[surfaceindex])
{
- if (R_CullBox(surfaces[surfaceindex].mins, surfaces[surfaceindex].maxs)
+ if (R_CullFrustum(surfaces[surfaceindex].mins, surfaces[surfaceindex].maxs)
|| (r_vis_trace_surfaces.integer && !R_CanSeeBox(r_vis_trace_samples.integer, r_vis_trace_eyejitter.value, r_vis_trace_enlarge.value, r_vis_trace_expand.value, r_vis_trace_pad.value, r_refdef.view.origin, surfaces[surfaceindex].mins, surfaces[surfaceindex].maxs)))
surfacevisible[surfaceindex] = 0;
}
for (j = 0, leaf = model->brush.data_leafs;j < model->brush.num_leafs;j++, leaf++)
{
// if leaf is in current pvs and on the screen, mark its surfaces
- if (CHECKPVSBIT(r_refdef.viewcache.world_pvsbits, leaf->clusterindex) && !R_CullBox(leaf->mins, leaf->maxs))
+ if (CHECKPVSBIT(r_refdef.viewcache.world_pvsbits, leaf->clusterindex) && !R_CullFrustum(leaf->mins, leaf->maxs))
{
r_refdef.stats[r_stat_world_leafs]++;
r_refdef.viewcache.world_leafvisible[j] = true;
if (leaf->clusterindex < 0)
continue;
// if leaf is in current pvs and on the screen, mark its surfaces
- if (!R_CullBox(leaf->mins, leaf->maxs))
+ if (!R_CullFrustum(leaf->mins, leaf->maxs))
{
r_refdef.stats[r_stat_world_leafs]++;
r_refdef.viewcache.world_leafvisible[j] = true;
if (leaf->clusterindex < 0)
continue;
// if leaf is in current pvs and on the screen, mark its surfaces
- if (CHECKPVSBIT(r_refdef.viewcache.world_pvsbits, leaf->clusterindex) && !R_CullBox(leaf->mins, leaf->maxs))
+ if (CHECKPVSBIT(r_refdef.viewcache.world_pvsbits, leaf->clusterindex) && !R_CullFrustum(leaf->mins, leaf->maxs))
{
r_refdef.stats[r_stat_world_leafs]++;
r_refdef.viewcache.world_leafvisible[j] = true;
cullmaxs[0] = p->maxs[0] + cullbias;
cullmaxs[1] = p->maxs[1] + cullbias;
cullmaxs[2] = p->maxs[2] + cullbias;
- if (R_CullBox(cullmins, cullmaxs))
+ if (R_CullFrustum(cullmins, cullmaxs))
continue;
if (r_vis_trace.integer)
{
void R_Mod_DrawAddWaterPlanes(entity_render_t *ent)
{
- int i, j, n, flagsmask;
+ int i, n, flagsmask;
model_t *model = ent->model;
msurface_t *surfaces;
if (model == NULL)
if (ent == r_refdef.scene.worldentity)
{
for (i = model->submodelsurfaces_start;i < model->submodelsurfaces_end;i++)
- {
- j = model->modelsurfaces_sorted[i];
- if (r_refdef.viewcache.world_surfacevisible[j])
- if (surfaces[j].texture->basematerialflags & flagsmask)
- R_Water_AddWaterPlane(surfaces + j, 0);
- }
+ if (r_refdef.viewcache.world_surfacevisible[i])
+ if (surfaces[i].texture->basematerialflags & flagsmask)
+ R_Water_AddWaterPlane(surfaces + i, 0);
}
else
{
else
n = 0;
for (i = model->submodelsurfaces_start;i < model->submodelsurfaces_end;i++)
- {
- j = model->modelsurfaces_sorted[i];
- if (surfaces[j].texture->basematerialflags & flagsmask)
- R_Water_AddWaterPlane(surfaces + j, n);
- }
+ if (surfaces[i].texture->basematerialflags & flagsmask)
+ R_Water_AddWaterPlane(surfaces + i, n);
}
rsurface.entity = NULL; // used only by R_GetCurrentTexture and RSurf_ActiveModelEntity
}
continue;
#endif
#if 0
- if (!r_shadow_compilingrtlight && R_CullBoxCustomPlanes(node->mins, node->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes))
+ if (!r_shadow_compilingrtlight && R_CullBox(node->mins, node->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes))
continue;
#endif
// axial planes can be processed much more quickly
continue;
#endif
#if 1
- if (!r_shadow_compilingrtlight && R_CullBoxCustomPlanes(leaf->mins, leaf->maxs, info->numfrustumplanes, info->frustumplanes))
+ if (!r_shadow_compilingrtlight && R_CullBox(leaf->mins, leaf->maxs, info->numfrustumplanes, info->frustumplanes))
continue;
#endif
continue;
#endif
#if 1
- if (!r_shadow_compilingrtlight && R_CullBoxCustomPlanes(leaf->mins, leaf->maxs, info->numfrustumplanes, info->frustumplanes))
+ if (!r_shadow_compilingrtlight && R_CullBox(leaf->mins, leaf->maxs, info->numfrustumplanes, info->frustumplanes))
continue;
#endif
surfaceindex = leaf->surfaceindex;
continue;
#endif
#if 0
- if (!r_shadow_compilingrtlight && R_CullBoxCustomPlanes(node->mins, node->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes))
+ if (!r_shadow_compilingrtlight && R_CullBox(node->mins, node->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes))
continue;
#endif
if (info->lightmins[axis] <= node->backmax)