Fix visibility in Polymer with r_usenewshading 4 and palette emulation off.

Move some visibility-related constants from Polymer "core" code elsewhere.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6590 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-01-26 04:35:06 +00:00
parent 1e04f43240
commit 392d5fc942
3 changed files with 30 additions and 16 deletions

View file

@ -494,7 +494,7 @@ void calc_and_apply_fog(int32_t tile, int32_t shade, int32_t vis, int32_t pal)
fogresult2 = -GL_FOG_MAX; // hide fog behind the camera
fogcol = fogtable[pal];
if (((uint8_t)(vis + 16)) > 0 && g_visibility > 0)
if (((uint8_t)(vis + 16)) > 0 && globalvisibility > 0)
{
GLfloat glfogconstant = 262144.f;
GLfloat fogrange = (frealmaxshade * glfogconstant) / (((uint8_t)(vis + 16)) * globalvisibility);