Skip to content

Commit 2cd432c

Browse files
authored
Refine matrix multiplication tests to enable validation (#2308)
The `math_operators.mtlx` test for matrix multiplication was multiplying just identity matrices. If actually ran to produce an image, it would not show an error in matrices having swapped arguments. In this PR I've changed the values so the result is `0.75, 0.25, 0.5, 1` when multiplies correctly, and `0.25, 0.75, 0.5, 1` when swapped. I ran the tests with this `<input name="renderTestPaths" type="string" value="resources/Materials/TestSuite/stdlib/math" />`, before after the fix introduced in #2298.
1 parent e0a9a25 commit 2cd432c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

resources/Materials/TestSuite/stdlib/math/math_operators.mtlx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,8 @@
679679
</nodegraph>
680680
<nodegraph name="multiply_matrix33">
681681
<multiply name="multiply1" type="matrix33">
682-
<input name="in1" type="matrix33" value="1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0" />
683-
<input name="in2" type="matrix33" value="1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0" />
682+
<input name="in1" type="matrix33" value="0.0, 1.5, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 1.0" />
683+
<input name="in2" type="matrix33" value="0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" />
684684
</multiply>
685685
<transformmatrix name="transformmatrix1" type="vector3">
686686
<input name="in" type="vector3" value="0.5, 0.5, 0.5" />
@@ -690,8 +690,8 @@
690690
</nodegraph>
691691
<nodegraph name="multiply_matrix44">
692692
<multiply name="multiply1" type="matrix44">
693-
<input name="in1" type="matrix44" value="1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" />
694-
<input name="in2" type="matrix44" value="1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" />
693+
<input name="in1" type="matrix44" value="0.0, 1.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" />
694+
<input name="in2" type="matrix44" value="0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" />
695695
</multiply>
696696
<transformmatrix name="transformmatrix1" type="vector4">
697697
<input name="in" type="vector4" value="0.5, 0.5, 0.5, 1.0" />

0 commit comments

Comments
 (0)