]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
handle funky ToAscii values (shift/ctrl/alt sometimes produce ascii values for no...
[xonotic/darkplaces.git] / gl_rsurf.c
index 94622dc05d6154f9f84b8b0c9951739d9d7d923d..255a49b3640bfc7713a1fd97346a35096cc6d2d2 100644 (file)
@@ -249,7 +249,7 @@ static void R_BuildLightMap (const entity_render_t *ent, msurface_t *surf)
 
        // set to full bright if no light data
                bl = intblocklights;
-               if ((ent->effects & EF_FULLBRIGHT) || !ent->model->brushq1.lightdata)
+               if (!ent->model->brushq1.lightdata)
                {
                        for (i = 0;i < size3;i++)
                                bl[i] = 255*256;
@@ -337,7 +337,7 @@ static void R_BuildLightMap (const entity_render_t *ent, msurface_t *surf)
 
        // set to full bright if no light data
                bl = floatblocklights;
-               if ((ent->effects & EF_FULLBRIGHT) || !ent->model->brushq1.lightdata)
+               if (!ent->model->brushq1.lightdata)
                        j = 255*256;
                else
                        j = r_ambient.value * 512.0f; // would be 128.0f logically, but using 512.0f to match winquake style
@@ -1232,6 +1232,16 @@ static void RSurfShader_Wall_Lightmap(const entity_render_t *ent, const texture_
                        }
                }
        }
+       else if (ent->effects & EF_FULLBRIGHT)
+       {
+               RSurfShader_OpaqueWall_Pass_BaseTexture(ent, texture, surfchain);
+               if (r_detailtextures.integer)
+                       RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, surfchain);
+               if (texture->skin.glow)
+                       RSurfShader_OpaqueWall_Pass_Glow(ent, texture, surfchain);
+               if (fogenabled)
+                       RSurfShader_OpaqueWall_Pass_Fog(ent, texture, surfchain);
+       }
        else if (r_shadow_realtime_world.integer)
        {
                // opaque base lighting
@@ -1786,6 +1796,7 @@ void R_Q3BSP_DrawSkyFace(entity_render_t *ent, q3mface_t *face)
        rmeshstate_t m;
        if (!face->num_triangles)
                return;
+       c_faces++;
        if (skyrendernow)
        {
                skyrendernow = false;
@@ -2025,6 +2036,7 @@ void R_Q3BSP_DrawFace(entity_render_t *ent, q3mface_t *face)
                if (face->texture->surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NODRAW))
                        return;
        }
+       c_faces++;
        face->visframe = r_framecount;
        if ((face->texture->surfaceparms & Q3SURFACEPARM_TRANS) || ent->alpha < 1 || (ent->effects & EF_ADDITIVE))
        {
@@ -2075,11 +2087,13 @@ void R_Q3BSP_RecursiveWorldNode(entity_render_t *ent, q3mnode_t *node, const vec
        {
                if (R_CullBox(node->mins, node->maxs))
                        return;
+               c_nodes++;
                R_Q3BSP_RecursiveWorldNode(ent, node->children[0], modelorg, pvs, markframe);
                node = node->children[1];
        }
        if (R_CullBox(node->mins, node->maxs))
                return;
+       c_leafs++;
        leaf = (q3mleaf_t *)node;
        if (pvs[leaf->clusterindex >> 3] & (1 << (leaf->clusterindex & 7)))
                for (i = 0;i < leaf->numleaffaces;i++)