HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tokens.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_TOKENS_H
25 #define PXR_IMAGING_HD_TOKENS_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
31 
33 
34 #define HD_TOKENS \
35  (accelerations) \
36  (adjacency) \
37  (bboxLocalMin) \
38  (bboxLocalMax) \
39  (bbox) \
40  (bezier) \
41  (bSpline) \
42  (camera) \
43  (catmullRom) \
44  (collection) \
45  (computeShader) \
46  (coordSysBindings) \
47  (cubic) \
48  (cullStyle) \
49  (doubleSided) \
50  (dispatchCount) \
51  (displayColor) \
52  (displayOpacity) \
53  (displayStyle) \
54  (drawDispatch) \
55  (drawingShader) \
56  (drawingCoord0) \
57  (drawingCoord1) \
58  (drawingCoord2) \
59  (drawingCoordI) \
60  (drivers) \
61  (edgeIndices) \
62  (elementCount) \
63  (elementsVisibility) \
64  (extent) \
65  (faceColors) \
66  (filters) \
67  (full) \
68  (geometry) \
69  (hermite) \
70  (hullIndices) \
71  (indices) \
72  (isFlipped) \
73  (itemsDrawn) \
74  (layout) \
75  (leftHanded) \
76  (linear) \
77  (lightLink) \
78  (lightFilterLink) \
79  (materialParams) \
80  (nonperiodic) \
81  (normals) \
82  (params) \
83  (patchParam) \
84  (periodic) \
85  (pinned) \
86  (points) \
87  (pointsIndices) \
88  (power) \
89  (preview) \
90  (pointsVisibility) \
91  (primvar) \
92  (primID) \
93  (primitiveParam) \
94  (quadInfo) \
95  (renderTags) \
96  (rightHanded) \
97  (segmented) \
98  (shadowLink) \
99  (subdivTags) \
100  (taskState) \
101  (taskParams) \
102  (topology) \
103  (topologyVisibility) \
104  (totalItemCount) \
105  (transform) \
106  (transformInverse) \
107  (velocities) \
108  (visibility) \
109  (widths)
110 
111 #define HD_INSTANCER_TOKENS \
112  (culledInstanceIndices) \
113  (instancer) \
114  (instancerTransform) \
115  (instancerTransformInverse) \
116  (instanceIndices) \
117  (instanceIndexBase) \
118  (instanceTransform) \
119  (rotate) \
120  (scale) \
121  (translate)
122 
123 #define HD_REPR_TOKENS \
124  (disabled) \
125  (hull) \
126  (points) \
127  (smoothHull) \
128  (refined) \
129  (refinedWire) \
130  (refinedWireOnSurf) \
131  (wire) \
132  (wireOnSurf)
133 
134 #define HD_PERF_TOKENS \
135  (adjacencyBufSize) \
136  (basisCurvesTopology) \
137  (bufferSourcesResolved) \
138  (bufferArrayRangeMigrated) \
139  (bufferArrayRangeContainerResized) \
140  (collectionsRefreshed) \
141  (computationsCommited) \
142  (drawBatches) \
143  (drawCalls) \
144  (dirtyLists) \
145  (dirtyListsRebuilt) \
146  (garbageCollected) \
147  (garbageCollectedSsbo) \
148  (garbageCollectedUbo) \
149  (garbageCollectedVbo) \
150  (gpuMemoryUsed) \
151  (instBasisCurvesTopology) \
152  (instBasisCurvesTopologyRange) \
153  (instExtComputationDataRange) \
154  (instMeshTopology) \
155  (instMeshTopologyRange) \
156  (instPrimvarRange) \
157  (instVertexAdjacency) \
158  (meshTopology) \
159  (nonUniformSize) \
160  (numCompletedSamples) \
161  (quadrangulateCPU) \
162  (quadrangulateGPU) \
163  (quadrangulateFaceVarying) \
164  (quadrangulatedVerts) \
165  (rebuildBatches) \
166  (singleBufferSize) \
167  (ssboSize) \
168  (skipInvisibleRprimSync) \
169  (subdivisionRefineCPU) \
170  (subdivisionRefineGPU) \
171  (textureMemory) \
172  (triangulateFaceVarying) \
173  (uboSize) \
174  (vboRelocated)
175 
176 #define HD_SHADER_TOKENS \
177  (alphaThreshold) \
178  (clipPlanes) \
179  (commonShaderSource) \
180  (computeShader) \
181  (cullStyle) \
182  (drawRange) \
183  (environmentMap) \
184  (fragmentShader) \
185  (geometryShader) \
186  (indicatorColor) \
187  (lightingBlendAmount) \
188  (overrideColor) \
189  (maskColor) \
190  (projectionMatrix) \
191  (pointColor) \
192  (pointSize) \
193  (pointSelectedSize) \
194  (materialTag) \
195  (tessControlShader) \
196  (tessEvalShader) \
197  (tessLevel) \
198  (viewport) \
199  (vertexShader) \
200  (wireframeColor) \
201  (worldToViewMatrix) \
202  (worldToViewInverseMatrix)
203 
204 // Deprecated. Use: HdStMaterialTagTokens
205 #define HD_MATERIALTAG_TOKENS \
206  (defaultMaterialTag)
207 
208 /* Terminal keys used in material networks.
209  */
210 #define HD_MATERIAL_TERMINAL_TOKENS \
211  (surface) \
212  (displacement) \
213  (volume) \
214  (light) \
215  (lightFilter)
216 
217 #define HD_RENDERTAG_TOKENS \
218  (geometry) \
219  (guide) \
220  (hidden) \
221  (proxy) \
222  (render)
223 
224 #define HD_RENDER_CONTEXT_TOKENS \
225  ((universal, ""))
226 
227 #define HD_OPTION_TOKENS \
228  (parallelRprimSync)
229 
230 #define HD_PRIMTYPE_TOKENS \
231  /* Rprims */ \
232  (mesh) \
233  (basisCurves) \
234  (points) \
235  (volume) \
236  \
237  /* Sprims */ \
238  (camera) \
239  (drawTarget) \
240  (material) \
241  (coordSys) \
242  /* Sprims Lights */ \
243  (simpleLight) \
244  (cylinderLight) \
245  (diskLight) \
246  (distantLight) \
247  (domeLight) \
248  (light) \
249  (lightFilter) \
250  (pluginLight) \
251  (rectLight) \
252  (sphereLight) \
253  /* Sprims ExtComputations */ \
254  (extComputation) \
255  \
256  /* Bprims */ \
257  (renderBuffer)
258 
259 #define HD_PRIMVAR_ROLE_TOKENS \
260  ((none, "")) \
261  (color) \
262  (vector) \
263  (normal) \
264  (point) \
265  (textureCoordinate)
266 
267 /* Schema for "Alternate Output Values" rendering,
268  * describing which values a renderpass should
269  * compute and write at render time.
270  */
271 #define HD_AOV_TOKENS \
272  /* Standard rendering outputs */ \
273  \
274  /* HdAovTokens->color represents the final
275  * fragment RGBA color. For correct compositing
276  * using Hydra, it should have pre-multiplied alpha.
277  */ \
278  (color) \
279  /* HdAovTokens->depth represents the clip-space
280  * depth of the final fragment.
281  */ \
282  (depth) \
283  /* HdAovTokens->cameraDepth represents the camera-space
284  * depth of the final fragment.
285  */ \
286  (cameraDepth) \
287  /* ID rendering - these tokens represent the
288  * prim, instance, and subprim ids of the final
289  * fragment.
290  */ \
291  (primId) \
292  (instanceId) \
293  (elementId) \
294  (edgeId) \
295  (pointId) \
296  /* Geometric data */ \
297  (Peye) \
298  (Neye) \
299  (patchCoord) \
300  (primitiveParam) \
301  (normal) \
302  /* Others we might want to add:
303  * https://rmanwiki.pixar.com/display/REN/Arbitrary+Output+Variables
304  * - curvature
305  * - tangent
306  * - velocity
307  */ \
308  /* Primvars:
309  * The tokens don't try to enumerate primvars,
310  * but instead provide an identifying namespace.
311  * The "color" primvar is addressable as "primvars:color".
312  */ \
313  ((primvars, "primvars:")) \
314  /* Light path expressions:
315  * Applicable only to raytracers, these tell
316  * the renderer to output specific shading
317  * components for specific classes of lightpath.
318  *
319  * Lightpath syntax is defined here:
320  * https://rmanwiki.pixar.com/display/REN/Light+Path+Expressions
321  * ... so for example, you could specify
322  * "lpe:CD[<L.>O]"
323  */ \
324  ((lpe, "lpe:")) \
325  /* Shader signals:
326  * This tells the renderer to output a partial shading signal,
327  * whether from the BXDF (e.g. bxdf.diffuse) or from an intermediate
328  * shading node (e.g. fractal.rgb).
329  * XXX: The exact format is TBD.
330  */ \
331  ((shader, "shader:"))
332 
333 HD_API
334 TfToken HdAovTokensMakePrimvar(TfToken const& primvar);
335 
336 HD_API
338 
339 HD_API
341 
342 /* Schema for application-configurable render settings. */
343 #define HD_RENDER_SETTINGS_TOKENS \
344  /* General graphical options */ \
345  (enableShadows) \
346  (enableSceneMaterials) \
347  (enableSceneLights) \
348  /* Raytracer sampling settings */ \
349  (convergedVariance) \
350  (convergedSamplesPerPixel) \
351  /* thread limit settings */ \
352  (threadLimit) \
353  /* interactive vs offline */ \
354  (enableInteractive)
355 
356 #define HD_RESOURCE_TYPE_TOKENS \
357  (texture) \
358  (shaderFile)
359 
366 TF_DECLARE_PUBLIC_TOKENS(HdMaterialTerminalTokens, HD_API,
376 
378 
379 #endif //PXR_IMAGING_HD_TOKENS_H
#define HD_MATERIAL_TERMINAL_TOKENS
Definition: tokens.h:210
#define HD_REPR_TOKENS
Definition: tokens.h:123
#define HD_OPTION_TOKENS
Definition: tokens.h:227
#define HD_INSTANCER_TOKENS
Definition: tokens.h:111
HD_API TfToken HdAovTokensMakePrimvar(TfToken const &primvar)
HD_API TfToken HdAovTokensMakeShader(TfToken const &shader)
#define HD_API
Definition: api.h:40
#define HD_PERF_TOKENS
Definition: tokens.h:134
#define HD_MATERIALTAG_TOKENS
Definition: tokens.h:205
Definition: token.h:87
TF_DECLARE_PUBLIC_TOKENS(GusdTokens, GUSD_TOKENS)
#define HD_RESOURCE_TYPE_TOKENS
Definition: tokens.h:356
#define HD_RENDERTAG_TOKENS
Definition: tokens.h:217
#define HD_PRIMTYPE_TOKENS
Definition: tokens.h:230
GLuint shader
Definition: glcorearb.h:784
#define HD_TOKENS
Definition: tokens.h:34
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
#define HD_RENDER_CONTEXT_TOKENS
Definition: tokens.h:224
HD_API TfToken HdAovTokensMakeLpe(TfToken const &lpe)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
#define HD_PRIMVAR_ROLE_TOKENS
Definition: tokens.h:259
#define HD_SHADER_TOKENS
Definition: tokens.h:176
#define HD_AOV_TOKENS
Definition: tokens.h:271
#define HD_RENDER_SETTINGS_TOKENS
Definition: tokens.h:343