int i, j, lines, y;
cl_locnode_t *loc;
char string[1024+4096];
+ mleaf_t *viewleaf;
string[0] = 0;
if (r_speeds.integer && cls.signon == SIGNONS && cls.state == ca_connected)
// put the location name in the r_speeds display as it greatly helps
// when creating loc files
loc = CL_Locs_FindNearest(cl.movement_origin);
+ viewleaf = (r_refdef.scene.worldmodel && r_refdef.scene.worldmodel->brush.PointInLeaf) ? r_refdef.scene.worldmodel->brush.PointInLeaf(r_refdef.scene.worldmodel, r_refdef.view.origin) : NULL;
dpsnprintf(string, sizeof(string),
"%s%s\n"
"%3i renders org:'%+8.2f %+8.2f %+8.2f' dir:'%+2.3f %+2.3f %+2.3f'\n"
"%7i surfaces%7i triangles %5i entities (%7i surfaces%7i triangles)\n"
"%5i leafs%5i portals%6i/%6i particles%6i/%6i decals %3i%% quality\n"
-"%7i lightmap updates (%7i pixels)\n"
+"%7i lightmap updates (%7i pixels)%s\n"
"%4i lights%4i clears%4i scissored%7i light%7i shadow%7i dynamic\n"
"rendered%6i meshes%8i triangles bloompixels%8i copied%8i drawn\n"
"%s"
, r_refdef.stats.renders, r_refdef.view.origin[0], r_refdef.view.origin[1], r_refdef.view.origin[2], r_refdef.view.forward[0], r_refdef.view.forward[1], r_refdef.view.forward[2]
, r_refdef.stats.world_surfaces, r_refdef.stats.world_triangles, r_refdef.stats.entities, r_refdef.stats.entities_surfaces, r_refdef.stats.entities_triangles
, r_refdef.stats.world_leafs, r_refdef.stats.world_portals, r_refdef.stats.particles, cl.num_particles, r_refdef.stats.decals, cl.num_decals, (int)(100 * r_refdef.view.quality)
-, r_refdef.stats.lightmapupdates, r_refdef.stats.lightmapupdatepixels
+, r_refdef.stats.lightmapupdates, r_refdef.stats.lightmapupdatepixels, viewleaf ? va(" clusterindex%6i", viewleaf->clusterindex) : ""
, r_refdef.stats.lights, r_refdef.stats.lights_clears, r_refdef.stats.lights_scissored, r_refdef.stats.lights_lighttriangles, r_refdef.stats.lights_shadowtriangles, r_refdef.stats.lights_dynamicshadowtriangles
, r_refdef.stats.meshes, r_refdef.stats.meshes_elements / 3, r_refdef.stats.bloom_copypixels, r_refdef.stats.bloom_drawpixels
, r_speeds_timestring);
// called with a batch, so numsurfaces is always 1, and the surfacelist
// contains only a leaf number for coloring purposes
const mportal_t *portal = (mportal_t *)ent;
+ qboolean isvis;
int i, numpoints;
float *v;
float vertex3f[POLYGONELEMENTS_MAXPOINTS*3];
R_Mesh_ResetTextureState();
R_SetupGenericShader(false);
- i = surfacelist[0];
+ isvis = (portal->here->clusterindex >= 0 && portal->past->clusterindex >= 0 && portal->here->clusterindex != portal->past->clusterindex);
+
+ i = surfacelist[0] >> 1;
GL_Color(((i & 0x0007) >> 0) * (1.0f / 7.0f) * r_refdef.view.colorscale,
((i & 0x0038) >> 3) * (1.0f / 7.0f) * r_refdef.view.colorscale,
((i & 0x01C0) >> 6) * (1.0f / 7.0f) * r_refdef.view.colorscale,
- 0.125f);
+ isvis ? 0.125f : 0.03125f);
for (i = 0, v = vertex3f;i < numpoints;i++, v += 3)
VectorCopy(portal->points[i].position, v);
R_Mesh_Draw(0, numpoints, 0, numpoints - 2, NULL, polygonelements, 0, 0);