File tree Expand file tree Collapse file tree
resources/Materials/TestSuite/stdlib/definition Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <materialx version =" 1.39" >
3+
4+ <!-- create a custom node that exposes an enumeration input via "interfacename" -->
5+ <nodedef name =" ND_positionwrapper" node =" positionwrapper" >
6+ <input name =" wrap_space" type =" string" value =" object" enum =" model, object, world" uniform =" true" />
7+ <output name =" out" type =" vector3" />
8+ </nodedef >
9+ <nodegraph name =" NG_positionwrapper" nodedef =" ND_positionwrapper" >
10+ <position name =" myPos" type =" vector3" >
11+ <input name =" space" type =" string" interfacename =" wrap_space" />
12+ </position >
13+ <output name =" out" type =" vector3" nodename =" myPos" />
14+ </nodegraph >
15+
16+ <positionwrapper name =" myPosWrapper" type =" vector3" >
17+ <input name =" wrap_space" type =" string" value =" object" />
18+ </positionwrapper >
19+
20+ <extract name =" extract" type =" float" >
21+ <input name =" in" type =" vector3" nodename =" myPosWrapper" />
22+ <input name =" index" type =" integer" value =" 1" />
23+ </extract >
24+ <surface_unlit name =" Srf" type =" surfaceshader" >
25+ <input name =" emission" type =" float" nodename =" extract" />
26+ </surface_unlit >
27+ <surfacematerial name =" Mtl" type =" material" >
28+ <input name =" surfaceshader" type =" surfaceshader" nodename =" Srf" />
29+ </surfacematerial >
30+ </materialx >
You can’t perform that action at this time.
0 commit comments