aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-14 20:11:34 +0200
committervaxerski <[email protected]>2022-05-14 20:11:34 +0200
commitf7214114d4a1c82c28b2e107d0f1e8eae48fd8da (patch)
treeb51fa0b2bef8d4636d7f6be114d263d4818f4913
parentf0d52d8a88ca64c4a806bdd1eb8aaf549970d6f6 (diff)
downloadHyprland-f7214114d4a1c82c28b2e107d0f1e8eae48fd8da.tar.gz
Hyprland-f7214114d4a1c82c28b2e107d0f1e8eae48fd8da.zip
adjust blur radius
-rw-r--r--src/events/Monitors.cpp2
-rw-r--r--src/render/OpenGL.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index d8e98ec0..65049426 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -191,7 +191,7 @@ void Events::listener_monitorFrame(void* owner, void* data) {
const auto BLURSIZE = g_pConfigManager->getInt("decoration:blur_size");
const auto BLURPASSES = g_pConfigManager->getInt("decoration:blur_passes");
- const auto BLURRADIUS = BLURSIZE * BLURPASSES * 2; // is this 2? I don't know but 2 works.
+ const auto BLURRADIUS = BLURSIZE * pow(2, BLURPASSES); // is this 2^pass? I don't know but it works... I think.
pixman_region32_copy(&g_pHyprOpenGL->m_rOriginalDamageRegion, &damage);
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 1711d08e..59bea30d 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -377,7 +377,7 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
pixman_region32_t damage;
pixman_region32_init(&damage);
pixman_region32_copy(&damage, originalDamage);
- wlr_region_expand(&damage, &damage, BLURPASSES * BLURSIZE * 2);
+ wlr_region_expand(&damage, &damage, pow(2, BLURPASSES) * BLURSIZE);
// helper
const auto PMIRRORFB = &m_mMonitorRenderResources[m_RenderData.pMonitor].mirrorFB;