Skip to content

Commit

Permalink
Fix multiply matrix order for skew.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroyuki Ikezoe committed Jul 28, 2017
1 parent 81e51b3 commit b0a91ec
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -2397,19 +2397,19 @@ impl From<MatrixDecomposed3D> for ComputedMatrix {
let mut temp = ComputedMatrix::identity();
if decomposed.skew.2 != 0.0 {
temp.m32 = decomposed.skew.2;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}

if decomposed.skew.1 != 0.0 {
temp.m32 = 0.0;
temp.m31 = decomposed.skew.1;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}

if decomposed.skew.0 != 0.0 {
temp.m31 = 0.0;
temp.m21 = decomposed.skew.0;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}

// Apply scale
Expand Down

0 comments on commit b0a91ec

Please sign in to comment.