From 3118b48650c26fa5fec28eacdd02779c14b7a766 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 12 Jan 2023 14:17:10 +0100 Subject: [PATCH] Disable vertex snapping for Wobbly Windows and Magic Lamp The subdivided grid used by these effects doesn't account for pixel alignment. If we force the generated WindowQuads to be rounded, the quad's sizes no longer match the texture sizes, which results in blurry rendering. BUG: 461283 eeffects --- src/effects/magiclamp/magiclamp.cpp | 2 ++ src/effects/wobblywindows/wobblywindows.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/effects/magiclamp/magiclamp.cpp b/src/effects/magiclamp/magiclamp.cpp index f2591a744a..09edd56fd1 100644 --- a/src/effects/magiclamp/magiclamp.cpp +++ b/src/effects/magiclamp/magiclamp.cpp @@ -23,6 +23,8 @@ MagicLampEffect::MagicLampEffect() connect(effects, &EffectsHandler::windowDeleted, this, &MagicLampEffect::slotWindowDeleted); connect(effects, &EffectsHandler::windowMinimized, this, &MagicLampEffect::slotWindowMinimized); connect(effects, &EffectsHandler::windowUnminimized, this, &MagicLampEffect::slotWindowUnminimized); + + setVertexSnappingMode(RenderGeometry::VertexSnappingMode::None); } bool MagicLampEffect::supported() diff --git a/src/effects/wobblywindows/wobblywindows.cpp b/src/effects/wobblywindows/wobblywindows.cpp index 4da51253c8..7ca42df2b8 100644 --- a/src/effects/wobblywindows/wobblywindows.cpp +++ b/src/effects/wobblywindows/wobblywindows.cpp @@ -127,6 +127,8 @@ WobblyWindowsEffect::WobblyWindowsEffect() connect(effects, &EffectsHandler::windowStepUserMovedResized, this, &WobblyWindowsEffect::slotWindowStepUserMovedResized); connect(effects, &EffectsHandler::windowFinishUserMovedResized, this, &WobblyWindowsEffect::slotWindowFinishUserMovedResized); connect(effects, &EffectsHandler::windowMaximizedStateChanged, this, &WobblyWindowsEffect::slotWindowMaximizeStateChanged); + + setVertexSnappingMode(RenderGeometry::VertexSnappingMode::None); } WobblyWindowsEffect::~WobblyWindowsEffect()