Skip to content

Commit

Permalink
Adds vector math shader validation tests. (AcademySoftwareFoundation#157
Browse files Browse the repository at this point in the history
)
  • Loading branch information
feldstj committed Oct 11, 2018
1 parent be50c8a commit deba1f7
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions documents/TestSuite/stdlib/math/vector_math.mtlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!--

Basic vector math function tests each test is in a separate graph for each variation in input type.
- normalize
- magnitude
- dotproduct
- crossproduct

-->

<?xml version="1.0"?>
<materialx version="1.36">
<nodegraph name="normalize_vector2" type="" xpos="6.21379" ypos="18.74">
<normalize name="normalize1" type="vector2" xpos="5.74483" ypos="4.74">
<input name="in" type="vector2" value="1.0000, 0.5000" />
</normalize>
<output name="out" type="vector2" nodename="normalize1" />
</nodegraph>
<nodegraph name="normalize_vector3" type="" xpos="7.21444" ypos="18.7234">
<normalize name="normalize1" type="vector3" xpos="5.74483" ypos="4.74">
<input name="in" type="vector3" value="1.0000, 0.5000, 0.0" />
</normalize>
<output name="out" type="vector3" nodename="normalize1" />
</nodegraph>
<nodegraph name="normalize_vector4" type="" xpos="8.21433" ypos="18.7019">
<normalize name="normalize1" type="vector4" xpos="5.74483" ypos="4.74">
<input name="in" type="vector4" value="1.0000, 0.5000, 0.0, 0.7500" />
</normalize>
<output name="out" type="vector4" nodename="normalize1" />
</nodegraph>
<nodegraph name="magnitude_vector2" type="" xpos="6.21402" ypos="19.9893">
<magnitude name="magnitude1" type="float" xpos="5.74483" ypos="4.74">
<input name="in" type="vector2" value="1.0000, 0.5000" />
</magnitude>
<output name="out" type="float" nodename="magnitude1" />
</nodegraph>
<nodegraph name="magnitude_vector3" type="" xpos="7.2191" ypos="19.9964">
<magnitude name="magnitude1" type="float" xpos="5.74483" ypos="4.74">
<input name="in" type="vector3" value="1.0000, 0.5000, 0.0" />
</magnitude>
<output name="out" type="float" nodename="magnitude1" />
</nodegraph>
<nodegraph name="magnitude_vector4" type="" xpos="8.21926" ypos="19.975">
<magnitude name="magnitude1" type="float" xpos="5.74483" ypos="4.74">
<input name="in" type="vector4" value="1.0000, 0.5000, 0.0, 0.7500" />
</magnitude>
<output name="out" type="float" nodename="magnitude1" />
</nodegraph>
<nodegraph name="dotproduct_vector2" type="" xpos="6.22542" ypos="21.2711">
<output name="out" type="float" nodename="dotproduct1" />
<dotproduct name="dotproduct1" type="float" xpos="5.84999" ypos="5.4547">
<input name="in1" type="vector2" value="1.0000, 0.5000" />
<input name="in2" type="vector2" value="0.5000, 1.0000" />
</dotproduct>
</nodegraph>
<nodegraph name="dotproduct_vector3" type="" xpos="7.22804" ypos="21.2682">
<dotproduct name="dotproduct1" type="float" xpos="5.74483" ypos="4.58">
<input name="in1" type="vector3" value="1.0000, 0.5000, 0.0" />
<input name="in2" type="vector3" value="0.5000, 1.0000, 1.0000" />
</dotproduct>
<output name="out" type="float" nodename="dotproduct1" />
</nodegraph>
<nodegraph name="dotproduct_vector4" type="" xpos="8.22574" ypos="21.261">
<dotproduct name="dotproduct1" type="float" xpos="5.74483" ypos="4.58">
<input name="in1" type="vector4" value="1.0000, 0.5000, 0.0, 1.0000" />
<input name="in2" type="vector4" value="0.5000, 1.0000, 1.0000, 1.0000" />
</dotproduct>
<output name="out" type="float" nodename="dotproduct1" />
</nodegraph>
<nodegraph name="crossproduct_vector3" type="" xpos="6.23281" ypos="22.5398">
<crossproduct name="crossproduct1" type="vector3" xpos="5.74483" ypos="4.58">
<input name="in1" type="vector3" value="1.0000, 1.0000, 0.0" />
<input name="in2" type="vector3" value="0.0, 1.0000, 1.0000" />
</crossproduct>
<output name="out" type="vector3" nodename="crossproduct1" />
</nodegraph>
</materialx>

0 comments on commit deba1f7

Please sign in to comment.