From a24e92d0b768594aae6a8b4130cf73bb6e741d64 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 10 Jun 2021 10:06:31 +0200 Subject: [PATCH] blur: Use a custom projection matrix when passing to copy sample The screen projection matrix doesn't necessarily apply to that framebuffer, so we can't use it. --- src/effects/blur/blur.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/effects/blur/blur.cpp b/src/effects/blur/blur.cpp index fae1c39410..4f8983a698 100644 --- a/src/effects/blur/blur.cpp +++ b/src/effects/blur/blur.cpp @@ -673,7 +673,10 @@ void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float o glEnable(GL_FRAMEBUFFER_SRGB); } - copyScreenSampleTexture(vbo, blurRectCount, shape.translated(xTranslate, yTranslate), screenProjection); + const QRect screenRect = effects->virtualScreenGeometry(); + QMatrix4x4 mvp; + mvp.ortho(0, screenRect.width(), screenRect.height(), 0, 0, 65535); + copyScreenSampleTexture(vbo, blurRectCount, shape.translated(xTranslate, yTranslate), mvp); } else { m_renderTargets.first()->blitFromFramebuffer(sourceRect, destRect);