From 3a0f2de8772ea8ffcd20b400e2d1f515d61860b3 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 9 Jul 2013 18:23:44 +0000 Subject: [PATCH] Polymost "use tile shades": don't confound shade and visibility. That is, for shade of objects, use shade tables. For visibility, use GL fog. Mixing these two does not produce satisfactory results in areas where both shade and visibility darkening are high, such as around the E1L1 restroom. git-svn-id: https://svn.eduke32.com/eduke32@3941 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 0f2a873c7..72b77378d 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -524,12 +524,9 @@ static void fogcalc_old(int32_t shade, int32_t vis) static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal) { - Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol)); + UNREFERENCED_PARAMETER(tile); - if (getrendermode() == REND_POLYMOST && r_usetileshades && shade > 0 && - (!usehightile || !hicfindsubst(tile, pal, 0)) && - (!usemodels || md_tilehasmodel(tile, pal) < 0)) - shade >>= 1; + Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol)); if (r_usenewshading!=2) { @@ -1377,7 +1374,7 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method) float hackscx, hackscy; if (skyclamphack) method |= 4; - pth = texcache_fetch(globalpicnum,globalpal,getpalookup(globvis>>2, globalshade),method&(~3)); + pth = texcache_fetch(globalpicnum, globalpal, getpalookup(0,globalshade), method&(~3)); if (!pth) {