-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1339 from Autodesk/t_gamaj/MAYA-108563/implement_…
…kDefaultMaterial_shading_mode MAYA-108563 - Support default material shading using new SDK APIs
- Loading branch information
Showing
16 changed files
with
343 additions
and
7 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
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
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
Binary file added
BIN
+5.66 KB
...gatePerInstanceInheritedDataTest/baseline/defaultMaterialBillboards_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.62 KB
...nstanceInheritedDataTest/baseline/defaultMaterialBillboards_defaultSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.09 KB
...ePerInstanceInheritedDataTest/baseline/defaultMaterialBillboards_notDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.15 KB
...atePerInstanceInheritedDataTest/baseline/defaultMaterialBillboards_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7 KB
...ePerInstanceInheritedDataTest/baseline/defaultMaterialBillboards_unselected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#usda 1.0 | ||
( | ||
defaultPrim = "GEO" | ||
metersPerUnit = 0.01 | ||
upAxis = "Y" | ||
) | ||
|
||
def Xform "GEO" | ||
{ | ||
def Mesh "BILLBOARD" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
kind = "component" | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
float3[] extent = [(-1.5, 0, -1.5), (1.5, 0, 1.5)] | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </GEO/BILLBOARD/Looks/TEXTUREDA> | ||
point3f[] points = [(-1.5, 0, 1.5), (1.5, 0, 1.5), (-1.5, 0, -1.5), (1.5, 0, -1.5)] | ||
texCoord2f[] primvars:map1 = [(0, 0), (1, 0), (0, 1), (1, 1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
int[] primvars:map1:indices = [0, 1, 3, 2] | ||
|
||
def Scope "Looks" | ||
{ | ||
def Material "TEXTUREDA" | ||
{ | ||
token inputs:file1:varname = "map1" | ||
token outputs:surface.connect = </GEO/BILLBOARD/Looks/TEXTUREDA/TEXTUREDA.outputs:surface> | ||
|
||
def Shader "TEXTUREDA" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor.connect = </GEO/BILLBOARD/Looks/TEXTUREDA/file1.outputs:rgb> | ||
token outputs:displacement | ||
token outputs:surface | ||
} | ||
|
||
def Shader "file1" | ||
{ | ||
uniform token info:id = "UsdUVTexture" | ||
float4 inputs:fallback = (0.5, 0.5, 0.5, 1) | ||
asset inputs:file = @green_A.png@ | ||
float2 inputs:st.connect = </GEO/BILLBOARD/Looks/TEXTUREDA/file1/TexCoordReader.outputs:result> | ||
token inputs:wrapS = "repeat" | ||
token inputs:wrapT = "repeat" | ||
float3 outputs:rgb | ||
|
||
def Shader "TexCoordReader" | ||
{ | ||
uniform token info:id = "UsdPrimvarReader_float2" | ||
token inputs:varname.connect = </GEO/BILLBOARD/Looks/TEXTUREDA.inputs:file1:varname> | ||
float2 outputs:result | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.