Fix visibility in Polymer with r_usenewshading 4.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6558 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-12-12 05:14:02 +00:00
parent ae47d2f11d
commit 2f98d759f6
3 changed files with 10 additions and 5 deletions

View file

@ -496,7 +496,7 @@ void calc_and_apply_fog(int32_t tile, int32_t shade, int32_t vis, int32_t pal)
if (((uint8_t)(vis + 16)) > 0 && g_visibility > 0)
{
GLfloat glfogconstant = 262144.f / xdimen;
GLfloat glfogconstant = 262144.f;
GLfloat fogrange = (frealmaxshade * glfogconstant) / (((uint8_t)(vis + 16)) * globalvisibility);
GLfloat normalizedshade = shade / frealmaxshade;
GLfloat fogshade = normalizedshade * fogrange;