mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 08:31:45 +00:00
- added CVARs to control menu blur
- made blur effect menu only
This commit is contained in:
parent
959fb2577b
commit
e49b549364
2 changed files with 10 additions and 2 deletions
|
@ -166,7 +166,7 @@ void FGLRenderer::PostProcessScene(int fixedcm)
|
|||
ColormapScene(fixedcm);
|
||||
LensDistortScene();
|
||||
ApplyFXAA();
|
||||
BlurScene();
|
||||
//BlurScene();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -474,14 +474,19 @@ void FGLRenderer::BloomScene(int fixedcm)
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
CVAR(Float, gl_menu_blur, 5.0f, CVAR_ARCHIVE)
|
||||
CVAR(Bool, gl_menu_blur_enabled, false, CVAR_ARCHIVE)
|
||||
|
||||
void FGLRenderer::BlurScene()
|
||||
{
|
||||
if ((!gl_menu_blur_enabled) || (gl_menu_blur <= 0.0))
|
||||
return;
|
||||
FGLDebug::PushGroup("BlurScene");
|
||||
|
||||
FGLPostProcessState savedState;
|
||||
savedState.SaveTextureBindings(2);
|
||||
|
||||
const float blurAmount = 5.0f;
|
||||
const float blurAmount = gl_menu_blur;
|
||||
int sampleCount = 9;
|
||||
int numLevels = 3; // Must be 4 or less (since FGLRenderBuffers::NumBloomLevels is 4 and we are using its buffers).
|
||||
assert(numLevels <= FGLRenderBuffers::NumBloomLevels);
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include "textures/textures.h"
|
||||
#include "virtual.h"
|
||||
#include "events.h"
|
||||
#include "gl/renderer/gl_renderer.h" // for menu blur
|
||||
|
||||
//
|
||||
// Todo: Move these elsewhere
|
||||
|
@ -780,6 +781,8 @@ void M_Drawer (void)
|
|||
if (!CurrentMenu->DontDim)
|
||||
{
|
||||
screen->Dim(fade);
|
||||
if (GLRenderer)
|
||||
GLRenderer->BlurScene();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
CurrentMenu->CallDrawer();
|
||||
|
|
Loading…
Reference in a new issue