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
This commit is contained in:
helixhorned 2013-07-09 18:23:44 +00:00
parent 5e41c1604c
commit 3a0f2de877

View file

@ -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) 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 && Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol));
(!usehightile || !hicfindsubst(tile, pal, 0)) &&
(!usemodels || md_tilehasmodel(tile, pal) < 0))
shade >>= 1;
if (r_usenewshading!=2) if (r_usenewshading!=2)
{ {
@ -1377,7 +1374,7 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
float hackscx, hackscy; float hackscx, hackscy;
if (skyclamphack) method |= 4; 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) if (!pth)
{ {