diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-08-23 12:03:23 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-08-23 12:03:27 +0200 |
| commit | 9d094f655e7add990b0b4d46c80bb10fe9e58b9a (patch) | |
| tree | a637b5e12af6d52840a24ce9e1f5ff9a1a0c7471 /src/render/OpenGL.cpp | |
| parent | 5e7183daf514efb493bf812c71bf6de9153f5efd (diff) | |
renderer: track fade alpha for blur if ignore opacity is true
with ignore_opacity, blur would stay at 1 opacity during a fadeOut animation on layers, making it look wrong. Fixes #3051
Diffstat (limited to 'src/render/OpenGL.cpp')
| -rw-r--r-- | src/render/OpenGL.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index f5790762..9cd5ced8 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1110,7 +1110,7 @@ bool CHyprOpenGLImpl::shouldUseNewBlurOptimizations(SLayerSurface* pLayer, CWind return false; } -void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round, bool blockBlurOptimization) { +void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round, bool blockBlurOptimization, float blurA) { RASSERT(m_RenderData.pMonitor, "Tried to render texture with blur without begin()!"); static auto* const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue; @@ -1190,7 +1190,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, m_bEndFrame = true; // fix transformed const auto SAVEDRENDERMODIF = m_RenderData.renderModif; m_RenderData.renderModif = {}; // fix shit - renderTextureInternalWithDamage(POUTFB->m_cTex, &MONITORBOX, *PBLURIGNOREOPACITY ? 1.f : a, &texDamage, 0, false, false, false); + renderTextureInternalWithDamage(POUTFB->m_cTex, &MONITORBOX, *PBLURIGNOREOPACITY ? blurA : a * blurA, &texDamage, 0, false, false, false); m_bEndFrame = false; m_RenderData.renderModif = SAVEDRENDERMODIF; |
