Sort transparent surfaces back to front.

This allows overlapping transparent surfaces to look like they are
overlapping each other rather than only the nearest one showing.
This commit is contained in:
Bill Currie 2012-01-31 16:17:09 +09:00
parent 1052bd2624
commit b286a35281

View file

@ -365,7 +365,10 @@ chain_surface (msurface_t *surf, vec_t *transform, float *color)
tex = surf->texinfo->texture;
else
tex = R_TextureAnimation (surf);
CHAIN_SURF_F2B (surf, tex->tex_chain);
if (color && color[3] < 1.0)
CHAIN_SURF_B2F (surf, tex->tex_chain);
else
CHAIN_SURF_F2B (surf, tex->tex_chain);
update_lightmap (surf);
}