Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Oct 15, 2023
2 parents d7b0264 + a62a468 commit cc7df02
Show file tree
Hide file tree
Showing 40 changed files with 929 additions and 1,193 deletions.
25 changes: 25 additions & 0 deletions resources/Materials/TestSuite/stdlib/texture/texcoord.mtlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<materialx version="1.38" colorspace="lin_rec709">
<!--
Test for texture coordinates. This test makes sure that two texture coordinate nodes with various
widths can coexist.
-->
<standard_surface name="standard_surface" type="surfaceshader" xpos="6.152174" ypos="-0.560345">
<input name="base" type="float" value="1" />
<input name="base_color" type="color3" nodename="swizzle_vector2_color3" />
<input name="specular_roughness" type="float" value="0.1" />
<input name="subsurface" type="float" value="0.4" />
<input name="subsurface_color" type="color3" nodename="swizzle_vector3_color3" />
</standard_surface>
<surfacematerial name="surfacematerial" type="material" xpos="8.695652" ypos="0.000000">
<input name="surfaceshader" type="surfaceshader" nodename="standard_surface" />
</surfacematerial>
<texcoord name="texcoord_vector2" type="vector2" xpos="1.666667" ypos="-1.405172" />
<texcoord name="texcoord_vector3" type="vector3" xpos="0.268116" ypos="1.068966" />
<swizzle name="swizzle_vector3_color3" type="color3" xpos="3.101449" ypos="0.698276">
<input name="in" type="vector3" nodename="texcoord_vector3" />
</swizzle>
<swizzle name="swizzle_vector2_color3" type="color3" xpos="4.260870" ypos="-2.896552">
<input name="in" type="vector2" nodename="texcoord_vector2" />
</swizzle>
</materialx>
151 changes: 100 additions & 51 deletions resources/Materials/TestSuite/stdlib/upgrade/syntax_1_37.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,110 @@
Examples of MaterialX 1.37 syntax
-->

<nodegraph name="atan2_graph">
<atan2 name="atan2_float" type="float">
<input name="in1" type="float" value="0.5" />
<input name="in2" type="float" value="1.0" />
</atan2>
<atan2 name="atan2_vector2" type="vector2">
<input name="in1" type="vector2" value="0.5, 0.5" />
<input name="in2" type="vector2" value="1.0, 1.0" />
</atan2>
<atan2 name="atan2_vector3" type="vector3">
<input name="in1" type="vector3" value="0.5, 0.5, 0.5" />
<input name="in2" type="vector3" value="1.0, 1.0, 1.0" />
</atan2>
<atan2 name="atan2_vector4" type="vector4">
<input name="in1" type="vector4" value="0.5, 0.5, 0.5, 0.5" />
<input name="in2" type="vector4" value="1.0, 1.0, 1.0, 1.0" />
</atan2>
<rotate3d name="rot1" type="vector3">
<input name="in" type="vector3" value="1.0, 0.0, 0.0" />
<input name="amount" type="float" value="10.0" />
<parameter name="axis" type="vector3" value="0.0, 0.0, 1.0" />
</rotate3d>
</nodegraph>

<nodedef name="ND_Test" node="test">
<input name="add" type="float" />
<nodedef name="ND_example_surface" node="example_surface">
<input name="diffuseColor" type="color3" value="0.18, 0.18, 0.18" />
<input name="metalness" type="float" value="0" />
<input name="roughness" type="float" value="0.01" />
<input name="clearcoat" type="float" value="0" />
<input name="clearcoatRoughness" type="float" value="0.01" />
<input name="transmission" type="float" value="0" />
<input name="ior" type="float" value="1.5" />
<input name="emissiveColor" type="color3" value="0, 0, 0" />
<output name="out" type="surfaceshader" />
</nodedef>
<nodegraph name="NG_Test" nodedef="ND_Test">
<add name="add" type="float">
<input name="in1" type="float" interfacename="add" />
<input name="in2" type="float" value="1.0" />
</add>
<add name="add1" type="float">
<input name="in1" type="float" nodename="add" />
<input name="in2" type="float" value="1.0" />
</add>
</nodegraph>

<nodegraph name="NG_aiMixColor31">
<mix name="aiMixColor31" type="color3">
<input name="fg" type="color3" nodename="aiAbsvalColor31" />
<input name="bg" type="color3" nodename="aiAbsvalColor32" />
<input name="mix" type="float" value="0.5" />
<nodegraph name="NG_example_surface" nodedef="ND_example_surface">
<diffuse_brdf name="diffuse_bsdf" type="BSDF">
<input name="weight" type="float" value="1" />
<input name="color" type="color3" interfacename="diffuseColor" />
<input name="roughness" type="float" value="0" />
</diffuse_brdf>
<dielectric_btdf name="transmission_bsdf" type="BSDF">
<input name="weight" type="float" value="1" />
<input name="tint" type="color3" value="1, 1, 1" />
<input name="ior" type="float" interfacename="ior" />
</dielectric_btdf>
<mix name="transmission_mix" type="BSDF">
<input name="fg" type="BSDF" nodename="transmission_bsdf" />
<input name="bg" type="BSDF" nodename="diffuse_bsdf" />
<input name="mix" type="float" interfacename="transmission" />
</mix>
<absval name="aiAbsvalColor31" type="color3">
<input name="in" type="color3" value="1, 0, 0" />
</absval>
<absval name="aiAbsvalColor32" type="color3">
<input name="in" type="color3" value="0.671, 0.671, 0.671" />
</absval>
<output name="out" type="color3" nodename="aiMixColor31" />
<roughness_anisotropy name="specular_roughness" type="vector2">
<input name="roughness" type="float" interfacename="roughness" />
<input name="anisotropy" type="float" value="0" />
</roughness_anisotropy>
<subtract name="one_minus_ior" type="float">
<input name="in1" type="float" value="1" />
<input name="in2" type="float" interfacename="ior" />
</subtract>
<add name="one_plus_ior" type="float">
<input name="in1" type="float" value="1" />
<input name="in2" type="float" interfacename="ior" />
</add>
<divide name="div_ior" type="float">
<input name="in1" type="float" nodename="one_minus_ior" />
<input name="in2" type="float" nodename="one_plus_ior" />
</divide>
<multiply name="F0" type="float">
<input name="in1" type="float" nodename="div_ior" />
<input name="in2" type="float" nodename="div_ior" />
</multiply>
<multiply name="F0_albedo" type="color3">
<input name="in1" type="color3" interfacename="diffuseColor" />
<input name="in2" type="float" nodename="F0" />
</multiply>
<generalized_schlick_brdf name="dielectric_bsdf" type="BSDF">
<input name="weight" type="float" value="1" />
<input name="color0" type="color3" nodename="F0" channels="rrr"/>
<input name="color90" type="color3" value="1, 1, 1" />
<input name="roughness" type="vector2" nodename="specular_roughness" />
<input name="base" type="BSDF" nodename="transmission_mix" />
</generalized_schlick_brdf>
<conductor_brdf name="conductor_bsdf" type="BSDF">
<input name="weight" type="float" value="1" />
<input name="reflectivity" type="color3" nodename="F0_albedo" />
<input name="edge_color" type="color3" interfacename="diffuseColor" />
<input name="roughness" type="vector2" nodename="specular_roughness" />
</conductor_brdf>
<mix name="specular_bsdf" type="BSDF">
<input name="fg" type="BSDF" nodename="conductor_bsdf" />
<input name="bg" type="BSDF" nodename="dielectric_bsdf" />
<input name="mix" type="float" interfacename="metalness" />
</mix>
<roughness_anisotropy name="coat_roughness" type="vector2">
<input name="roughness" type="float" interfacename="clearcoatRoughness" />
<input name="anisotropy" type="float" value="0" />
</roughness_anisotropy>
<dielectric_brdf name="coat_bsdf" type="BSDF">
<input name="weight" type="float" interfacename="clearcoat" />
<input name="tint" type="color3" value="1, 1, 1" />
<input name="ior" type="float" value="1.5" />
<input name="roughness" type="vector2" nodename="coat_roughness" />
<input name="base" type="BSDF" nodename="specular_bsdf" />
</dielectric_brdf>
<uniform_edf name="emission_edf" type="EDF">
<input name="color" type="color3" interfacename="emissiveColor" />
</uniform_edf>
<surface name="surface_constructor" type="surfaceshader">
<input name="bsdf" type="BSDF" nodename="coat_bsdf" />
<input name="edf" type="EDF" nodename="emission_edf" />
</surface>
<output name="out" type="surfaceshader" nodename="surface_constructor" />
</nodegraph>
<material name="my_surface">
<shaderref name="my_surface" node="standard_surface">
<bindinput name="base_color" type="color3" nodegraph="NG_aiMixColor31" output="out" />

<material name="M_example_surface">
<shaderref name="SR_example_surface" node="example_surface">
<bindinput name="diffuseColor" type="color3" value="0.2, 0.2, 0.6" />
</shaderref>
</material>

<atan2 name="atan2" type="float">
<input name="in1" type="float" value="0.5" />
<input name="in2" type="float" value="1.0" />
</atan2>
<rotate3d name="rot1" type="vector3">
<input name="in" type="vector3" value="1.0, 0.0, 0.0" />
<input name="amount" type="float" value="10.0" />
<parameter name="axis" type="vector3" value="0.0, 0.0, 1.0" />
</rotate3d>
</materialx>
Loading

0 comments on commit cc7df02

Please sign in to comment.