From: havoc Date: Sun, 30 Sep 2007 13:23:34 +0000 (+0000) Subject: fix a bug where map becomes invisible (just sky) when the nearclip plane X-Git-Tag: xonotic-v0.1.0preview~2882 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9fb014422b40a433d0bcfd2c6c616976b5725f5a;p=xonotic%2Fdarkplaces.git fix a bug where map becomes invisible (just sky) when the nearclip plane 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 --- diff --git a/gl_rmain.c b/gl_rmain.c index 47b4c265..f0b636c3 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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) {