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.
Testcase for Shader reflection with USD
In this test we use a materialx document with two surfacematerial. We generate shaders for each of the surfaces and use reflection to report the input paths. Notice that the input paths for both surface materials are identical though the generated shader code isn't
- Loading branch information
1 parent
f822dc9
commit ab218c0
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
resources/Materials/TestSuite/usd_usage/surfacematerial.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,18 @@ | ||
<materialx version="1.38" colorspace="lin_rec709"> | ||
<!-- node shared between two surface materials--> | ||
<UsdPreviewSurface name="SR_plastic" type="surfaceshader"> | ||
<input name="diffuseColor" type="color3" value="0.10470402, 0.24188282, 0.81800002" /> | ||
<input name="roughness" type="float" value="0.32467532157897949" /> | ||
<input name="ior" type="float" value="1.5" /> | ||
</UsdPreviewSurface> | ||
|
||
<!-- 1st surfacematerial --> | ||
<surfacematerial name="USD_PlasticOne" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_plastic" /> | ||
</surfacematerial> | ||
|
||
<!-- 2nd surfacematerial --> | ||
<surfacematerial name="USD_PlasticTwo" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_plastic" /> | ||
</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