mode = SHADERMODE_LIGHTDIRECTIONMAP_MODELSPACE;
else
mode = SHADERMODE_LIGHTDIRECTIONMAP_TANGENTSPACE;
+ permutation |= SHADERPERMUTATION_DIFFUSE;
if (specularscale > 0)
permutation |= SHADERPERMUTATION_SPECULAR | SHADERPERMUTATION_DIFFUSE;
}
{
// fake deluxemapping (uniform light direction in tangentspace)
mode = SHADERMODE_LIGHTDIRECTIONMAP_TANGENTSPACE;
+ permutation |= SHADERPERMUTATION_DIFFUSE;
if (specularscale > 0)
permutation |= SHADERPERMUTATION_SPECULAR | SHADERPERMUTATION_DIFFUSE;
}
t->currentmaterialflags |= MATERIALFLAG_SHORTDEPTHRANGE;
if (ent->flags & RENDER_VIEWMODEL)
t->currentmaterialflags |= MATERIALFLAG_SHORTDEPTHRANGE;
- if (t->backgroundnumskinframes && !(t->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED))
+ if (t->backgroundnumskinframes && !(t->currentmaterialflags & MATERIALFLAG_BLENDED))
t->currentmaterialflags |= MATERIALFLAG_VERTEXTEXTUREBLEND;
+ if (t->currentmaterialflags & (MATERIALFLAG_BLENDED | MATERIALFLAG_NODEPTHTEST))
+ t->currentmaterialflags |= MATERIALFLAG_SORTTRANSPARENT;
+ if (t->currentmaterialflags & (MATERIALFLAG_REFRACTION | MATERIALFLAG_WATER))
+ t->currentmaterialflags &= ~MATERIALFLAG_SORTTRANSPARENT;
// make sure that the waterscroll matrix is used on water surfaces when
// there is no tcmod
static void R_DrawTextureSurfaceList_Sky(int texturenumsurfaces, msurface_t **texturesurfacelist)
{
// transparent sky would be ridiculous
- if ((rsurface.texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED))
+ if ((rsurface.texture->currentmaterialflags & MATERIALFLAG_SORTTRANSPARENT))
return;
if (rsurface.mode != RSURFMODE_SKY)
{
else
RSurf_DrawBatch_Simple(texturenumsurfaces, texturesurfacelist);
}
- if (rsurface.texture->backgroundnumskinframes && !(rsurface.texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED))
- {
- }
}
static void R_DrawTextureSurfaceList_GL13(int texturenumsurfaces, msurface_t **texturesurfacelist)
;
continue;
}
- if (rsurface.texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED)
+ if (rsurface.texture->currentmaterialflags & MATERIALFLAG_SORTTRANSPARENT)
{
// transparent surfaces get pushed off into the transparent queue
const msurface_t *surface = surfacelist[i];
// now figure out what to do with this particular range of surfaces
if (rsurface.texture->currentmaterialflags & (MATERIALFLAG_WALL | MATERIALFLAG_WATER))
{
- if (rsurface.texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED)
+ if (rsurface.texture->currentmaterialflags & MATERIALFLAG_SORTTRANSPARENT)
{
vec3_t tempcenter, center;
for (l = k;l < kend;l++)