effects/magnifier: Fix rendering on multi screen setups

The projection matrix is constructed incorrectly, use the one provided
by the scene instead.
This commit is contained in:
Vlad Zahorodnii 2023-02-23 23:31:00 +02:00
parent 0dec5e3f20
commit 42cff94f72

View file

@ -126,9 +126,7 @@ void MagnifierEffect::paintScreen(int mask, const QRegion &region, ScreenPaintDa
// paint magnifier
m_texture->bind();
auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);
QMatrix4x4 mvp;
const QSize size = effects->virtualScreenSize();
mvp.ortho(0, size.width() * scale, size.height() * scale, 0, 0, 65535);
QMatrix4x4 mvp = data.projectionMatrix();
mvp.translate(area.x() * scale, area.y() * scale);
s->setUniform(GLShader::ModelViewProjectionMatrix, mvp);
m_texture->render(area.size(), scale);