Skip to content

Commit fb1c1bc

Browse files
committed
add extra unit test - and fix up default version tagging - so both of the nodedefs with the new version can be selected
1 parent b612f3d commit fb1c1bc

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

libraries/bxdf/usd_preview_surface.mtlx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<!-- adding variant with scale and bias defined as vector4 type - we may decide to remove the original version
5454
in a future MaterialX version with an upgrade function -->
55-
<nodedef name="ND_UsdUVTexture_23_vector4" node="UsdUVTexture" nodegroup="texture2d" version="2.3">
55+
<nodedef name="ND_UsdUVTexture_23_vector4" node="UsdUVTexture" nodegroup="texture2d" version="2.3" isdefaultversion="true">
5656
<input name="file" type="filename" value="" uniform="true" />
5757
<input name="st" type="vector2" defaultgeomprop="UV0" />
5858
<input name="wrapS" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<materialx version="1.39" colorspace="lin_rec709">
3+
<UsdUVTexture name="image_color" type="multioutput">
4+
<input name="file" type="filename" value="../../../Images/brass_color.jpg" colorspace="srgb_texture" />
5+
</UsdUVTexture>
6+
<UsdUVTexture name="image_roughness" type="multioutput">
7+
<input name="file" type="filename" value="../../../Images/brass_roughness.jpg" />
8+
</UsdUVTexture>
9+
<UsdPreviewSurface name="SR_brass1" type="surfaceshader">
10+
<input name="diffuseColor" type="color3" nodename="image_color" output="rgb" />
11+
<input name="metallic" type="float" value="1" />
12+
<input name="roughness" type="float" nodename="image_roughness" output="r" />
13+
</UsdPreviewSurface>
14+
<surfacematerial name="USD_Tiled_Brass" type="material">
15+
<input name="surfaceshader" type="surfaceshader" nodename="SR_brass1" />
16+
</surfacematerial>
17+
</materialx>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<materialx version="1.39" colorspace="lin_rec709">
3+
<UsdUVTexture name="image_color" type="multioutput">
4+
<input name="file" type="filename" value="../../../Images/brass_color.jpg" colorspace="srgb_texture" />
5+
<input name="scale" type="vector4" value="0.5, 0.5, 0.5, 1" />
6+
</UsdUVTexture>
7+
<UsdUVTexture name="image_roughness" type="multioutput">
8+
<input name="file" type="filename" value="../../../Images/brass_roughness.jpg" />
9+
</UsdUVTexture>
10+
<UsdPreviewSurface name="SR_brass1" type="surfaceshader">
11+
<input name="diffuseColor" type="color3" nodename="image_color" output="rgb" />
12+
<input name="metallic" type="float" value="1" />
13+
<input name="roughness" type="float" nodename="image_roughness" output="r" />
14+
</UsdPreviewSurface>
15+
<surfacematerial name="USD_Tiled_Brass" type="material">
16+
<input name="surfaceshader" type="surfaceshader" nodename="SR_brass1" />
17+
</surfacematerial>
18+
</materialx>

0 commit comments

Comments
 (0)