From ffc580dda98437fa457d389f231de082df327345 Mon Sep 17 00:00:00 2001 From: Flafy Date: Sun, 4 Dec 2022 22:57:41 +0200 Subject: blur xray for layers (#1158) * feat: apply blur_xray to non window surfaces * don't blur optimize bottom and background layers --- src/render/OpenGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 021b8893..20457308 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -821,7 +821,7 @@ void CHyprOpenGLImpl::preWindowPass() { preBlurForCurrentMonitor(); } -void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round) { +void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, float a, wlr_surface* pSurface, int round, bool blockBlurOptimization) { RASSERT(m_RenderData.pMonitor, "Tried to render texture with blur without begin()!"); static auto *const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue; @@ -861,7 +861,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, } // vvv TODO: layered blur fbs? - const bool USENEWOPTIMIZE = (*PBLURNEWOPTIMIZE && m_pCurrentWindow && (!m_pCurrentWindow->m_bIsFloating || *PBLURXRAY) && m_RenderData.pCurrentMonData->blurFB.m_cTex.m_iTexID && !g_pCompositor->isWorkspaceSpecial(m_pCurrentWindow->m_iWorkspaceID)); + const bool USENEWOPTIMIZE = (*PBLURNEWOPTIMIZE && !blockBlurOptimization && ((m_pCurrentWindow && !m_pCurrentWindow->m_bIsFloating) || *PBLURXRAY) && m_RenderData.pCurrentMonData->blurFB.m_cTex.m_iTexID && (!m_pCurrentWindow || !g_pCompositor->isWorkspaceSpecial(m_pCurrentWindow->m_iWorkspaceID) )); CFramebuffer* POUTFB = nullptr; if (!USENEWOPTIMIZE) { -- cgit v1.2.3