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.
This commit is contained in:
Aleix Pol 2021-06-10 10:06:31 +02:00
parent fffd41b32e
commit a24e92d0b7

View file

@ -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);