From 849df9f152d51e2bfce34101f058d3afff589225 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 27 Jan 2008 00:46:45 +0000 Subject: [PATCH] added cl_minfps_qualitypower cvar to make particle quality drop more sharply at lower framerates git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8016 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 3 ++- host.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cl_screen.c b/cl_screen.c index 3c4ffd56..6124402c 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -2097,6 +2097,7 @@ extern cvar_t cl_minfps; extern cvar_t cl_minfps_fade; extern cvar_t cl_minfps_qualitymax; extern cvar_t cl_minfps_qualitymin; +extern cvar_t cl_minfps_qualitypower; extern cvar_t cl_minfps_qualityscale; static double cl_updatescreen_rendertime = 0; static double cl_updatescreen_quality = 1; @@ -2170,7 +2171,7 @@ void CL_UpdateScreen(void) qglClearColor(0,0,0,0);CHECKGLERROR R_ClearScreen(false); r_refdef.view.clear = false; - r_refdef.view.quality = bound(cl_minfps_qualitymin.value, cl_updatescreen_quality * cl_minfps_qualityscale.value, cl_minfps_qualitymax.value); + r_refdef.view.quality = bound(cl_minfps_qualitymin.value, pow(cl_updatescreen_quality, cl_minfps_qualitypower.value) * cl_minfps_qualityscale.value, cl_minfps_qualitymax.value); if(scr_stipple.integer) { diff --git a/host.c b/host.c index 5e830cac..5c8cb67e 100644 --- a/host.c +++ b/host.c @@ -63,6 +63,7 @@ cvar_t cl_minfps = {CVAR_SAVE, "cl_minfps", "40", "minimum fps target - while th cvar_t cl_minfps_fade = {CVAR_SAVE, "cl_minfps_fade", "0.2", "how fast the quality adapts to varying framerate"}; cvar_t cl_minfps_qualitymax = {CVAR_SAVE, "cl_minfps_qualitymax", "1", "highest allowed drawdistance multiplier"}; cvar_t cl_minfps_qualitymin = {CVAR_SAVE, "cl_minfps_qualitymin", "0.25", "lowest allowed drawdistance multiplier"}; +cvar_t cl_minfps_qualitypower = {CVAR_SAVE, "cl_minfps_qualitypower", "4", "raises quality value to a power of itself, higher values make quality drop more sharply in relation to framerate"}; cvar_t cl_minfps_qualityscale = {CVAR_SAVE, "cl_minfps_qualityscale", "0.5", "multiplier for quality"}; cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "1000000", "maximum fps cap, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"}; cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"}; @@ -210,6 +211,7 @@ static void Host_InitLocal (void) Cvar_RegisterVariable (&cl_minfps_fade); Cvar_RegisterVariable (&cl_minfps_qualitymax); Cvar_RegisterVariable (&cl_minfps_qualitymin); + Cvar_RegisterVariable (&cl_minfps_qualitypower); Cvar_RegisterVariable (&cl_minfps_qualityscale); Cvar_RegisterVariable (&cl_maxfps); Cvar_RegisterVariable (&cl_maxidlefps); -- 2.39.2