plugins/glide: Fix rotation order when applying render target transformation

The perspective projection matrix has its y axis flipped vertically. It
should be undone when applying the render target transformation, otherwise
the rotation order will be wrong.

BUG: 481664
This commit is contained in:
Vlad Zahorodnii 2024-02-23 12:14:39 +02:00
parent 9da0b8543f
commit 7c0a88f34b

View file

@ -41,7 +41,11 @@ static const QSet<QString> s_blacklist{
static QMatrix4x4 createPerspectiveMatrix(const QRectF &rect, const qreal scale, const QMatrix4x4 &renderTargetTransformation)
{
QMatrix4x4 ret = renderTargetTransformation;
QMatrix4x4 ret;
ret.scale(1, -1);
ret *= renderTargetTransformation;
ret.scale(1, -1);
const float fovY = std::tan(qDegreesToRadians(60.0f) / 2);
const float aspect = 1.0f;