plugins/backgroundcontrast: Correct texture transform
The y axis should be mirrored as the last step, otherwise it's going to change the winding order in rotation transforms in the render target transform. BUG: 479934
This commit is contained in:
parent
f75fb70ddc
commit
6d0f1fedc0
1 changed files with 2 additions and 2 deletions
|
@ -474,13 +474,13 @@ void ContrastEffect::doContrast(const RenderTarget &renderTarget, const RenderVi
|
|||
// to texture coordinates.
|
||||
const QRectF boundingRect = actualShape.boundingRect();
|
||||
QMatrix4x4 textureMatrix;
|
||||
textureMatrix.scale(1, -1);
|
||||
textureMatrix.translate(0, -1);
|
||||
// apply texture->buffer transformation
|
||||
textureMatrix.translate(0.5, 0.5);
|
||||
textureMatrix *= renderTarget.transform().toMatrix();
|
||||
textureMatrix.translate(-0.5, -0.5);
|
||||
// scaled logical to texture coordinates
|
||||
textureMatrix.scale(1, -1);
|
||||
textureMatrix.translate(0, -1);
|
||||
textureMatrix.scale(1.0 / boundingRect.width(), 1.0 / boundingRect.height(), 1);
|
||||
textureMatrix.translate(-boundingRect.x(), -boundingRect.y(), 0);
|
||||
textureMatrix.scale(1.0 / viewport.scale(), 1.0 / viewport.scale());
|
||||
|
|
Loading…
Reference in a new issue