- made gl_menu_blur into a menu option

- made bluramount also into a gameinfo option
- negative gl_menu_blur cvar now uses gameinfo option, 0 disables it
- removed gl_menu_blur_enabled since gl_menu_blur==0 does that anyway
- made gl_menu_blur default to -1 to use gameinfo option
- add default gameinfo bluramount options
This commit is contained in:
Rachael Alexanderson 2017-03-14 19:11:13 -04:00
commit b747b0c3c6
13 changed files with 23 additions and 6 deletions

View file

@ -145,8 +145,7 @@ CUSTOM_CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE | CVAR_NOINITC
GLRenderer->ClearTonemapPalette();
}
CVAR(Float, gl_menu_blur, 1.0f, CVAR_ARCHIVE)
CVAR(Bool, gl_menu_blur_enabled, true, CVAR_ARCHIVE)
CVAR(Float, gl_menu_blur, -1.0f, CVAR_ARCHIVE)
EXTERN_CVAR(Float, vid_brightness)
EXTERN_CVAR(Float, vid_contrast)
@ -475,10 +474,17 @@ void FGLRenderer::BloomScene(int fixedcm)
//
//-----------------------------------------------------------------------------
void FGLRenderer::BlurScene()
void FGLRenderer::BlurScene(float gameinfobluramount)
{
// first, respect the CVar
float blurAmount = gl_menu_blur;
if ((!gl_menu_blur_enabled) || (gl_menu_blur <= 0.0) || !FGLRenderBuffers::IsEnabled())
// if CVar is negative, use the gameinfo entry
if (gl_menu_blur < 0)
blurAmount = gameinfobluramount;
// if blurAmount == 0 or somehow still returns negative, exit to prevent a crash, clearly we don't want this
if ((blurAmount <= 0.0) || !FGLRenderBuffers::IsEnabled())
return;
FGLDebug::PushGroup("BlurScene");