- for (surf = firstsurf;surf;surf = surf->chain)
- if (surf->currenttexture->fogtexture == NULL)
- RSurfShader_Wall_Pass_Fog(ent, surf);
- }
-}
-
-static void RSurfShader_Wall_Lightmap(const entity_render_t *ent, const msurface_t *firstsurf)
-{
- const msurface_t *surf;
- vec3_t center;
- if (ent->alpha < 1 || ent->effects & EF_ADDITIVE)
- {
- for (surf = firstsurf;surf;surf = surf->chain)
- {
- Matrix4x4_Transform(&ent->matrix, surf->poly_center, center);
- R_MeshQueue_AddTransparent(center, RSurfShader_Wall_Vertex_Callback, ent, surf - ent->model->surfaces);
- }
- }
- else if (r_vertexsurfaces.integer || ent->alpha < 1 || ent->effects & EF_ADDITIVE)
- {
- for (surf = firstsurf;surf;surf = surf->chain)
- {
- if (surf->currenttexture->fogtexture != NULL)
- {
- Matrix4x4_Transform(&ent->matrix, surf->poly_center, center);
- R_MeshQueue_AddTransparent(center, RSurfShader_Wall_Vertex_Callback, ent, surf - ent->model->surfaces);
- }
- else
- RSurfShader_Wall_Pass_BaseVertex(ent, surf);
- }
- for (surf = firstsurf;surf;surf = surf->chain)
- if (surf->currenttexture->glowtexture)
- if (surf->currenttexture->fogtexture == NULL)
- RSurfShader_Wall_Pass_Glow(ent, surf);
- if (fogenabled)
- for (surf = firstsurf;surf;surf = surf->chain)
- if (surf->currenttexture->fogtexture == NULL)
- RSurfShader_Wall_Pass_Fog(ent, surf);