fix: attempt to preserve window alpha a bit better, tho it has artifacts

This commit is contained in:
Matias 2025-07-17 16:03:43 +02:00
parent e22c5db68a
commit 0a0161ee62
No known key found for this signature in database
GPG Key ID: ED35A6AC65A06B69

View File

@ -174,7 +174,7 @@ void hkRenderWindow(
pWindow->m_floatingOffset -= Vector2D {windowBox.x, windowBox.y}; pWindow->m_floatingOffset -= Vector2D {windowBox.x, windowBox.y};
// HACK: otherwise renderWindow will set an opaque region at top-left // HACK: otherwise renderWindow will set an opaque region at top-left
pWindow->m_activeInactiveAlpha->setValueAndWarp(0.999f); pWindow->m_alpha->setValueAndWarp(pWindow->m_alpha->goal() - 0.001f);
pRenderer->m_renderPass.add(makeUnique<CBindOwnFramebufferPassElement>(&windowFB)); pRenderer->m_renderPass.add(makeUnique<CBindOwnFramebufferPassElement>(&windowFB));
} }
@ -194,8 +194,8 @@ void hkRenderWindow(
if (shouldWobble) { if (shouldWobble) {
pWindow->m_floatingOffset += Vector2D {windowBox.x, windowBox.y}; pWindow->m_floatingOffset += Vector2D {windowBox.x, windowBox.y};
// FIXME: restore full opacity, which is uh wrong // HACK: this might interfere with anims, but it's all I got
pWindow->m_activeInactiveAlpha->setValueAndWarp(1.f); pWindow->m_alpha->setValueAndWarp(pWindow->m_alpha->goal() + 0.001f);
pRenderer->m_renderPass.add( pRenderer->m_renderPass.add(
makeUnique<CRenderWobblyWindowPassElement>(pOldFramebuffer, pWindow) makeUnique<CRenderWobblyWindowPassElement>(pOldFramebuffer, pWindow)