- if (stage == 0)
- c_brush_polys++;
- if (r_vertexsurfaces.integer)
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseVertex(s);
- return false;
- case 1:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- else if (r_multitexture.integer)
- {
- if (r_dlightmap.integer)
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseMTex(s);
- return false;
- case 1:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- else
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseMTex(s);
- return false;
- case 1:
- if (s->dlightframe == r_framecount)
- RSurfShader_Wall_Pass_Light(s);
- return false;
- case 2:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- }
- else if (s->currenttexture->fogtexture != NULL || currentrenderentity->alpha != 1 || currentrenderentity->effects & EF_ADDITIVE)
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseVertex(s);
- return false;
- case 1:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- else
- {
- if (r_dlightmap.integer)
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseTexture(s);
- return false;
- case 1:
- RSurfShader_Wall_Pass_BaseLightmap(s);
- return false;
- case 2:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- else
- {
- switch(stage)
- {
- case 0:
- RSurfShader_Wall_Pass_BaseTexture(s);
- return false;
- case 1:
- RSurfShader_Wall_Pass_BaseLightmap(s);
- return false;
- case 2:
- if (s->dlightframe == r_framecount)
- RSurfShader_Wall_Pass_Light(s);
- return false;
- case 3:
- RSurfShader_Wall_Pass_Glow(s);
- return false;
- default:
- return true;
- }
- }
- }
-}
-
-static int RSurfShader_Wall_Fog(int stage, msurface_t *s)
-{
- if (stage == 0 && fogenabled)
- {
- RSurfShader_Wall_Pass_Fog(s);
- return false;
- }
- else
- return true;