-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HdSt] There is a mismatch between the default wrapS/wrapT values in …
…MaterialX vs USD. Set these default MaterialX texture values to match MaterialX when unauthored. Fixes #1793 (Internal change: 2238296)
- Loading branch information
Showing
4 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
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
Binary file added
BIN
+319 KB
...sdImagingGL/testenv/testUsdImagingGLMaterialX/baseline/mxDefaultTextureVals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
pxr/usdImaging/usdImagingGL/testenv/testUsdImagingGLMaterialX/mxDefaultTextureVals.usda
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,37 @@ | ||
#usda 1.0 | ||
( | ||
upAxis = "Z" | ||
) | ||
|
||
def "TestMaterial" ( | ||
references = @texturedSphere.usda@ | ||
) | ||
{ | ||
rel material:binding = </MaterialX/Materials/DefaultValTest> | ||
} | ||
|
||
|
||
def Scope "MaterialX" ( | ||
references = [ | ||
@./textureTest.mtlx@</MaterialX>, | ||
] | ||
) | ||
{ | ||
} | ||
|
||
def Xform "lights" | ||
{ | ||
def DomeLight "DomeLight" | ||
{ | ||
asset inputs:texture:file = @./StinsonBeach.hdr@ | ||
float xformOp:rotateX:Zup = 90 | ||
uniform token[] xformOpOrder = ["xformOp:rotateX:Zup"] | ||
} | ||
def SphereLight "Light" | ||
{ | ||
float inputs:radius = 5 | ||
float inputs:intensity = 5 | ||
Vec3f xformOp:translate = (0, -20, 0) | ||
uniform token[] xformOpOrder = ["xformOp:translate"] | ||
} | ||
} |
30 changes: 26 additions & 4 deletions
30
pxr/usdImaging/usdImagingGL/testenv/testUsdImagingGLMaterialX/textureTest.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 |
---|---|---|
@@ -1,19 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38"> | ||
<nodegraph name="NG_imagetex"> | ||
<nodegraph name="NG_imagetex1"> | ||
<texcoord name="texcoord0" type="vector2" /> | ||
<image name="image0_color" type="color3" nodedef="ND_image_color3"> | ||
<input name="file" type="filename" uniform="true" value="./grid.png" /> | ||
<input name="texcoord" type="vector2" nodename="texcoord0" /> | ||
</image> | ||
<output name="out_color_0" type="color3" nodename="image0_color" /> | ||
</nodegraph> | ||
<standard_surface name="SR_test" type="surfaceshader"> | ||
<standard_surface name="SR_test1" type="surfaceshader"> | ||
<input name="base" type="float" value="1" /> | ||
<input name="base_color" type="color3" nodegraph="NG_imagetex" output="out_color_0" /> | ||
<input name="base_color" type="color3" nodegraph="NG_imagetex1" output="out_color_0" /> | ||
<input name="metalness" type="float" value="0" /> | ||
</standard_surface> | ||
<surfacematerial name="TextureTest" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_test" /> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_test1" /> | ||
</surfacematerial> | ||
|
||
<nodegraph name="NG_imagetex2"> | ||
<texcoord name="texcoord0" type="vector2" /> | ||
<place2d name="place2d" type="vector2" > | ||
<input name="texcoord" type="vector2" nodename="texcoord0" /> | ||
<input name="scale" type="vector2" value="0.1, 0.1" /> | ||
</place2d> | ||
<image name="image0_color" type="color3" nodedef="ND_image_color3"> | ||
<input name="file" type="filename" uniform="true" value="./grid.png" /> | ||
<input name="texcoord" type="vector2" nodename="place2d" /> | ||
<input name="uaddressmode" type="string" value="mirror"/> | ||
</image> | ||
<output name="out_color_0" type="color3" nodename="image0_color" /> | ||
</nodegraph> | ||
<standard_surface name="SR_test2" type="surfaceshader"> | ||
<input name="base" type="float" value="1" /> | ||
<input name="base_color" type="color3" nodegraph="NG_imagetex2" output="out_color_0" /> | ||
<input name="metalness" type="float" value="0" /> | ||
</standard_surface> | ||
<surfacematerial name="DefaultValTest" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="SR_test2" /> | ||
</surfacematerial> | ||
</materialx> |