From 9fb014422b40a433d0bcfd2c6c616976b5725f5a Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 30 Sep 2007 13:23:34 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.2