core/colorpipeline: fix matrix multiplication order when optimizing matrix operations
The other matrix needs to be applied first, so it must be on the right side in the matrix multiplication
This commit is contained in:
parent
388082cb3d
commit
7bdab9c4d2
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ void ColorPipeline::addMatrix(const QMatrix4x4 &mat, const ValueRange &output)
|
|||
if (!ops.empty()) {
|
||||
auto *lastOp = &ops.back().operation;
|
||||
if (const auto otherMat = std::get_if<ColorMatrix>(lastOp)) {
|
||||
otherMat->mat *= mat;
|
||||
otherMat->mat = mat * otherMat->mat;
|
||||
ops.back().output = output;
|
||||
return;
|
||||
} else if (const auto mult = std::get_if<ColorMultiplier>(lastOp)) {
|
||||
|
|
Loading…
Reference in a new issue