t->currentmaterialflags |= MATERIALFLAG_ADD | MATERIALFLAG_TRANSPARENT;
else if (t->currentalpha < 1)
t->currentmaterialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_TRANSPARENT;
+ if (ent->effects & EF_NODEPTHTEST)
+ t->currentmaterialflags |= MATERIALFLAG_NODEPTHTEST;
}
void R_UpdateAllTextureInfo(entity_render_t *ent)
tempcenter[1] = (surface->mins[1] + surface->maxs[1]) * 0.5f;
tempcenter[2] = (surface->mins[2] + surface->maxs[2]) * 0.5f;
Matrix4x4_Transform(&ent->matrix, tempcenter, center);
- R_MeshQueue_AddTransparent(ent->effects & EF_NODEPTHTEST ? r_vieworigin : center, RSurfShader_Transparent_Callback, ent, surface - ent->model->data_surfaces);
+ R_MeshQueue_AddTransparent(texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST ? r_vieworigin : center, RSurfShader_Transparent_Callback, ent, surface - ent->model->data_surfaces);
}
}
}
int renders;
float color[3], color2[3], colorscale, specularscale;
rmeshstate_t m;
- // FIXME: support EF_NODEPTHTEST
+ // FIXME: support MATERIALFLAG_NODEPTHTEST
if (!basetexture)
basetexture = r_texture_white;
if (!bumptexture)