]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a bug with height fog which was revealed by removing
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 Apr 2018 23:59:22 +0000 (23:59 +0000)
committerRudolf Polzer <divVerent@gmail.com>
Sun, 15 Mar 2020 01:50:34 +0000 (21:50 -0400)
RSurf_ActiveWorldEntity.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12373 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=008d8756aa494164956200272bda3ba7d1b8f2d7

gl_rmain.c

index cd41cacdbffeb56bb9ad74e35e18562c06c5d23e..4fa5d8b3465aae6ce374b3ca5aaa28389292c86d 100644 (file)
@@ -8801,7 +8801,7 @@ void RSurf_ActiveModelEntity(const entity_render_t *ent, qboolean wantnormals, q
        R_EntityMatrix(&rsurface.matrix);
        Matrix4x4_Transform(&rsurface.inversematrix, r_refdef.view.origin, rsurface.localvieworigin);
        Matrix4x4_TransformStandardPlane(&rsurface.inversematrix, r_refdef.fogplane[0], r_refdef.fogplane[1], r_refdef.fogplane[2], r_refdef.fogplane[3], rsurface.fogplane);
-       rsurface.fogplaneviewdist *= rsurface.inversematrixscale;
+       rsurface.fogplaneviewdist = r_refdef.fogplaneviewdist * rsurface.inversematrixscale;
        rsurface.fograngerecip = r_refdef.fograngerecip * rsurface.matrixscale;
        rsurface.fogheightfade = r_refdef.fogheightfade * rsurface.matrixscale;
        rsurface.fogmasktabledistmultiplier = FOGMASKTABLEWIDTH * rsurface.fograngerecip;