+ }
+ else if (r_shadows.integer == 3 && cl.worldmodel->numlights)
+ {
+ // opaque base lighting
+ RSurfShader_OpaqueWall_Pass_OpaqueGlow(ent, texture, firstsurf);
+ if (fogenabled)
+ RSurfShader_OpaqueWall_Pass_Fog(ent, texture, firstsurf);
+ }
+ else if (r_vertexsurfaces.integer)
+ {
+ // opaque vertex shaded from lightmap
+ for (surf = firstsurf;surf;surf = surf->texturechain)
+ if (surf->visframe == r_framecount)
+ RSurfShader_Wall_Pass_BaseVertex(ent, surf);
+ if (texture->glowtexture)
+ for (surf = firstsurf;surf;surf = surf->texturechain)
+ if (surf->visframe == r_framecount)
+ RSurfShader_Wall_Pass_Glow(ent, surf);
+ if (fogenabled)
+ for (surf = firstsurf;surf;surf = surf->texturechain)
+ if (surf->visframe == r_framecount)
+ RSurfShader_Wall_Pass_Fog(ent, surf);
+ }
+ else
+ {
+ // opaque lightmapped
+ if (r_textureunits.integer >= 2)
+ {
+ if (r_textureunits.integer >= 3 && gl_combine.integer && r_detailtextures.integer)
+ RSurfShader_OpaqueWall_Pass_BaseTripleTexCombine(ent, texture, firstsurf);
+ else
+ {
+ RSurfShader_OpaqueWall_Pass_BaseDoubleTex(ent, texture, firstsurf);
+ if (r_detailtextures.integer)
+ RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, firstsurf);
+ }
+ }
+ else
+ {
+ RSurfShader_OpaqueWall_Pass_BaseTexture(ent, texture, firstsurf);
+ RSurfShader_OpaqueWall_Pass_BaseLightmap(ent, texture, firstsurf);
+ if (r_detailtextures.integer)
+ RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, firstsurf);
+ }
+ if (!r_dlightmap.integer && !(ent->effects & EF_FULLBRIGHT))
+ RSurfShader_OpaqueWall_Pass_Light(ent, texture, firstsurf);
+ if (texture->glowtexture)
+ RSurfShader_OpaqueWall_Pass_Glow(ent, texture, firstsurf);
+ if (fogenabled)
+ RSurfShader_OpaqueWall_Pass_Fog(ent, texture, firstsurf);
+ }
+}