@@ -39,10 +39,48 @@ def Xform "Scene" (
3939 float2 outputs:result
4040 }
4141 }
42+
43+ def Material "MainMaterialWithOpacity"
44+ {
45+ token outputs:surface.connect = </Scene/Looks/MainMaterialWithOpacity/PbrPreview.outputs:surface>
46+
47+ def Shader "PbrPreview"
48+ {
49+ uniform token info:id = "UsdPreviewSurface"
50+ color3f inputs:diffuseColor.connect = </Scene/Looks/MainMaterialWithOpacity/Diffuse.outputs:rgb>
51+ float inputs:opacity.connect = </Scene/Looks/MainMaterialWithOpacity/Diffuse.outputs:a>
52+ token outputs:surface
53+ }
54+
55+ def Shader "Diffuse"
56+ {
57+ uniform token info:id = "UsdUVTexture"
58+ float2 inputs:st.connect = </Scene/Looks/MainMaterialWithOpacity/Primvar.outputs:result>
59+ float3 outputs:rgb
60+ float outputs:a
61+ }
62+
63+ def Shader "Primvar"
64+ {
65+ uniform token info:id = "UsdPrimvarReader_float2"
66+ string inputs:varname = "st"
67+ float2 outputs:result
68+ }
69+ }
4270 }
4371
4472 def Xform "Geom"
4573 {
74+ def Mesh "Backgroud"
75+ {
76+ color3f[] primvars:displayColor = [(0.7, 0, 0.7)] (
77+ interpolation = "constant"
78+ )
79+ int[] faceVertexCounts = [4]
80+ int[] faceVertexIndices = [0, 1, 2, 3]
81+ point3f[] points = [(-0.1,-0.1,-0.1), (2.2,-0.1,-0.1), (2.2,1.1,-0.1), (-0.1,1.1,-0.1)]
82+ }
83+
4684 def Mesh "Plane" (
4785 prepend apiSchemas = ["MaterialBindingAPI"]
4886 )
@@ -53,5 +91,16 @@ def Xform "Scene" (
5391 int[] faceVertexIndices = [0, 1, 2, 3]
5492 point3f[] points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0)]
5593 }
94+
95+ def Mesh "PlaneWithOpacity" (
96+ prepend apiSchemas = ["MaterialBindingAPI"]
97+ )
98+ {
99+ rel material:binding = </Scene/Looks/MainMaterialWithOpacity>
100+ float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex")
101+ int[] faceVertexCounts = [4]
102+ int[] faceVertexIndices = [0, 1, 2, 3]
103+ point3f[] points = [(1.1,0,0), (2.1,0,0), (2.1,1,0), (1.1,1,0)]
104+ }
56105 }
57106}
0 commit comments