forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve shader source duplication tests
This changelist improves the robustness of shader source duplication tests in MaterialXGenShader, and adds a new example material that highlights edge cases in the original logic.
- Loading branch information
1 parent
716660e
commit 685b377
Showing
4 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
resources/Materials/TestSuite/pbrlib/surfaceshader/usd_normal_map.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38" colorspace="lin_rec709"> | ||
<nodegraph name="NG_usd_normal_map"> | ||
<tiledimage name="N_tiledimage" type="vector3" nodedef="ND_tiledimage_vector3"> | ||
<input name="file" type="filename" value="resources/Images/mesh_wire_norm.png" /> | ||
<input name="uvtiling" type="vector2" value="8.0, 8.0" /> | ||
</tiledimage> | ||
<normalmap name="N_normalmap" type="vector3" nodedef="ND_normalmap"> | ||
<input name="in" type="vector3" nodename="N_tiledimage" /> | ||
<input name="space" type="string" value="object" /> | ||
</normalmap> | ||
<output name="out" type="vector3" nodename="N_normalmap" /> | ||
</nodegraph> | ||
<UsdPreviewSurface name="N_surface" type="surfaceshader"> | ||
<input name="normal" type="vector3" output="out" nodegraph="NG_usd_normal_map" /> | ||
<input name="diffuseColor" type="color3" value="1, 1, 1" /> | ||
<input name="metallic" type="float" value="1" /> | ||
<input name="roughness" type="float" value="0.001" /> | ||
</UsdPreviewSurface> | ||
<surfacematerial name="N_material" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="N_surface" /> | ||
</surfacematerial> | ||
</materialx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters