mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 02:09:48 +01:00
renderer: Fix blur for passes set to 0. (#3181)
This commit is contained in:
parent
2d100bf57e
commit
fa3de9b70e
1 changed files with 2 additions and 5 deletions
|
@ -975,13 +975,10 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, CRegion* o
|
|||
|
||||
// damage region will be scaled, make a temp
|
||||
CRegion tempDamage{damage};
|
||||
wlr_region_scale(tempDamage.pixman(), damage.pixman(), 1.f / 2.f); // when DOWNscaling, we make the region twice as small because it's the TARGET
|
||||
|
||||
drawPass(&m_RenderData.pCurrentMonData->m_shBLUR1, &tempDamage);
|
||||
|
||||
// and draw
|
||||
for (int i = 1; i < *PBLURPASSES; ++i) {
|
||||
wlr_region_scale(tempDamage.pixman(), damage.pixman(), 1.f / (1 << (i + 1)));
|
||||
for (int i = 1; i <= *PBLURPASSES; ++i) {
|
||||
wlr_region_scale(tempDamage.pixman(), damage.pixman(), 1.f / (1 << i));
|
||||
drawPass(&m_RenderData.pCurrentMonData->m_shBLUR1, &tempDamage); // down
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue