]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a bug where map becomes invisible (just sky) when the nearclip plane
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 30 Sep 2007 13:23:34 +0000 (13:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 30 Sep 2007 13:23:34 +0000 (13:23 +0000)
culls a portal, this bug was introduced by recent water shader rendering
features (using an extra clip plane for culling, accidentally activated
the view's nearclip plane as well, which culls portals accidentally)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7595 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 47b4c2653486ca6ee4b2079234e37de15792c671..f0b636c3060014927f7ce2bcf13ac0a496d27bb5 100644 (file)
@@ -1846,6 +1846,9 @@ int R_CullBox(const vec3_t mins, const vec3_t maxs)
        mplane_t *p;
        for (i = 0;i < r_view.numfrustumplanes;i++)
        {
+               // skip nearclip plane, it often culls portals when you are very close, and is almost never useful
+               if (i == 4)
+                       continue;
                p = r_view.frustum + i;
                switch(p->signbits)
                {