Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Dec 10, 2024
1 parent 4d44152 commit 51b0aee
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/render/pass/Pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void CRenderPass::simplify() {
// if there is live blur, we need to NOT occlude any area where it will be influenced
const auto WILLBLUR = std::ranges::any_of(m_vPassElements, [](const auto& el) { return el->element->needsLiveBlur(); });

CRegion newDamage = damage.copy().intersect(CBox{{}, g_pHyprOpenGL->m_RenderData.pMonitor->vecSize});
CRegion newDamage = damage.copy().intersect(CBox{{}, g_pHyprOpenGL->m_RenderData.pMonitor->vecTransformedSize});
for (auto& el : m_vPassElements | std::views::reverse) {

if (newDamage.empty()) {
Expand All @@ -35,19 +35,23 @@ void CRenderPass::simplify() {
}

el->elementDamage = newDamage;
auto bb = el->element->boundingBox();
if (!bb)
auto bb1 = el->element->boundingBox();
if (!bb1)
continue;

auto bb = bb1->scale(g_pHyprOpenGL->m_RenderData.pMonitor->scale);

// drop if empty
if (CRegion copy = newDamage.copy(); copy.intersect(*bb).empty()) {
if (CRegion copy = newDamage.copy(); copy.intersect(bb).empty()) {
el->discard = true;
continue;
}

auto opaque = el->element->opaqueRegion();

if (!opaque.empty()) {
opaque.scale(g_pHyprOpenGL->m_RenderData.pMonitor->scale);

// if this intersects the liveBlur region, allow live blur to operate correctly.
// do not occlude a border near it.
if (WILLBLUR) {
Expand Down

0 comments on commit 51b0aee

Please sign in to comment.