mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 04:20:34 +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);
|
ColormapScene(fixedcm);
|
||||||
LensDistortScene();
|
LensDistortScene();
|
||||||
ApplyFXAA();
|
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()
|
void FGLRenderer::BlurScene()
|
||||||
{
|
{
|
||||||
|
if ((!gl_menu_blur_enabled) || (gl_menu_blur <= 0.0))
|
||||||
|
return;
|
||||||
FGLDebug::PushGroup("BlurScene");
|
FGLDebug::PushGroup("BlurScene");
|
||||||
|
|
||||||
FGLPostProcessState savedState;
|
FGLPostProcessState savedState;
|
||||||
savedState.SaveTextureBindings(2);
|
savedState.SaveTextureBindings(2);
|
||||||
|
|
||||||
const float blurAmount = 5.0f;
|
const float blurAmount = gl_menu_blur;
|
||||||
int sampleCount = 9;
|
int sampleCount = 9;
|
||||||
int numLevels = 3; // Must be 4 or less (since FGLRenderBuffers::NumBloomLevels is 4 and we are using its buffers).
|
int numLevels = 3; // Must be 4 or less (since FGLRenderBuffers::NumBloomLevels is 4 and we are using its buffers).
|
||||||
assert(numLevels <= FGLRenderBuffers::NumBloomLevels);
|
assert(numLevels <= FGLRenderBuffers::NumBloomLevels);
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include "textures/textures.h"
|
#include "textures/textures.h"
|
||||||
#include "virtual.h"
|
#include "virtual.h"
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
|
#include "gl/renderer/gl_renderer.h" // for menu blur
|
||||||
|
|
||||||
//
|
//
|
||||||
// Todo: Move these elsewhere
|
// Todo: Move these elsewhere
|
||||||
|
@ -780,6 +781,8 @@ void M_Drawer (void)
|
||||||
if (!CurrentMenu->DontDim)
|
if (!CurrentMenu->DontDim)
|
||||||
{
|
{
|
||||||
screen->Dim(fade);
|
screen->Dim(fade);
|
||||||
|
if (GLRenderer)
|
||||||
|
GLRenderer->BlurScene();
|
||||||
V_SetBorderNeedRefresh();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
CurrentMenu->CallDrawer();
|
CurrentMenu->CallDrawer();
|
||||||
|
|
Loading…
Reference in a new issue