]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed meaning of r_useportalculling 1 to only use it with r_novis 1
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Apr 2008 09:55:37 +0000 (09:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 Apr 2008 09:55:37 +0000 (09:55 +0000)
cases (it would be good to use it when no vis data is loaded also, but
that's not currently handled)

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

gl_rsurf.c

index 14c2a187acbd6ae17e1091083941e98b03f62da2..e7d39184cc875ba0fba0d65a6034076ec251331b 100644 (file)
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 cvar_t r_ambient = {0, "r_ambient", "0", "brightens map, value is 0-128"};
 cvar_t r_lockpvs = {0, "r_lockpvs", "0", "disables pvs switching, allows you to walk around and inspect what is visible from a given location in the map (anything not visible from your current location will not be drawn)"};
 cvar_t r_lockvisibility = {0, "r_lockvisibility", "0", "disables visibility updates, allows you to walk around and inspect what is visible from a given viewpoint in the map (anything offscreen at the moment this is enabled will not be drawn)"};
-cvar_t r_useportalculling = {0, "r_useportalculling", "1", "use advanced portal culling visibility method to improve performance over just Potentially Visible Set, provides an even more significant speed improvement in unvised maps"};
+cvar_t r_useportalculling = {0, "r_useportalculling", "1", "improve framerate with r_novis 1 by using portal culling - still not as good as compiled visibility data in the map, but it helps (a value of 2 forces use of this even with vis data, which improves framerates in maps without too much complexity, but hurts in extremely complex maps, which is why 2 is not the default mode)"};
 cvar_t r_q3bsp_renderskydepth = {0, "r_q3bsp_renderskydepth", "0", "draws sky depth masking in q3 maps (as in q1 maps), this means for example that sky polygons can hide other things"};
 
 /*
@@ -450,9 +450,9 @@ void R_View_WorldVisibility(qboolean forcenovis)
                                }
                        }
                }
-               // if the user prefers to disable portal culling (testing?), simply
-               // use all on-screen leafs that are in the pvs.
-               else if (!r_useportalculling.integer)
+               // just check if each leaf in the PVS is on screen
+               // (unless portal culling is enabled)
+               else if (r_useportalculling.integer < 1 || (r_useportalculling.integer < 2 && !r_novis.integer))
                {
                        // pvs method:
                        // simply check if each leaf is in the Potentially Visible Set,
@@ -471,7 +471,7 @@ void R_View_WorldVisibility(qboolean forcenovis)
                                }
                        }
                }
-               // otherwise use a recursive portal flow, culling each portal to
+               // if desired use a recursive portal flow, culling each portal to
                // frustum and checking if the leaf the portal leads to is in the pvs
                else
                {