Loading...
Searching...
No Matches
tokens.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_ST_TOKENS_H
8#define PXR_IMAGING_HD_ST_TOKENS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16#define HDST_GLSL_PROGRAM_TOKENS \
17 (smoothNormalsFloatToFloat) \
18 (smoothNormalsFloatToPacked) \
19 (smoothNormalsDoubleToDouble) \
20 (smoothNormalsDoubleToPacked) \
21 (flatNormalsTriFloatToFloat) \
22 (flatNormalsTriFloatToPacked) \
23 (flatNormalsTriDoubleToDouble) \
24 (flatNormalsTriDoubleToPacked) \
25 (flatNormalsQuadFloatToFloat) \
26 (flatNormalsQuadFloatToPacked) \
27 (flatNormalsQuadDoubleToDouble) \
28 (flatNormalsQuadDoubleToPacked) \
29 (flatNormalsTriQuadFloatToFloat) \
30 (flatNormalsTriQuadFloatToPacked) \
31 (flatNormalsTriQuadDoubleToDouble) \
32 (flatNormalsTriQuadDoubleToPacked) \
33 (quadrangulateFloat) \
34 (quadrangulateDouble)
35
36#define HDST_TOKENS \
37 (constantLighting) \
38 (packedSmoothNormals) \
39 (smoothNormals) \
40 (packedFlatNormals) \
41 (flatNormals) \
42 (scale) \
43 (bias) \
44 (rotation) \
45 (translation) \
46 (sRGB) \
47 (raw) \
48 ((_double, "double")) \
49 ((_float, "float")) \
50 ((_int, "int")) \
51 ((colorSpaceAuto, "auto")) \
52 (fvarIndices) \
53 (fvarPatchParam) \
54 (coarseFaceIndex) \
55 (processedFaceCounts) \
56 (processedFaceIndices) \
57 (geomSubsetFaceIndices) \
58 (pointSizeScale) \
59 (screenSpaceWidths) \
60 (minScreenSpaceWidths) \
61 (shadowCompareTextures) \
62 (storm)
63
64#define HDST_TEXTURE_TOKENS \
65 (wrapS) \
66 (wrapT) \
67 (wrapR) \
68 (black) \
69 (clamp) \
70 (mirror) \
71 (repeat) \
72 (useMetadata) \
73 (minFilter) \
74 (magFilter) \
75 (linear) \
76 (nearest) \
77 (linearMipmapLinear) \
78 (linearMipmapNearest) \
79 (nearestMipmapLinear) \
80 (nearestMipmapNearest)
81
82#define HDST_RENDER_BUFFER_TOKENS \
83 ((stormMsaaSampleCount, "storm:msaaSampleCount"))
84
85#define HDST_RENDER_SETTINGS_TOKENS \
86 (defaultTransparencyMode) \
87 (enableTinyPrimCulling) \
88 (volumeRaymarchingStepSize) \
89 (volumeRaymarchingStepSizeLighting) \
90 (volumeMaxTextureMemoryPerField) \
91 (maxLights) \
92 (domeLightCubemapTargetMemory)
93
94#define HDST_DEFAULT_TRANSPARENCY_MODE_TOKENS \
95 (screenDoor) \
96 (additive) \
97 (oit)
98
99// Material tags help bucket prims into different queues for draw submission.
100// The tags supported by Storm are:
101// defaultMaterialTag : opaque geometry
102// masked : opaque geometry that uses cutout masks (e.g., foliage)
103// displayInOverlay : geometry that should be drawn on top (e.g. guides)
104// translucentToSelection: opaque geometry that allows occluded selection
105// to show through
106// additive : transparent geometry (cheap OIT solution w/o sorting)
107// translucent: transparent geometry (OIT solution w/ sorted fragment lists)
108// volume : transparent geoometry (raymarched)
109#define HDST_MATERIAL_TAG_TOKENS \
110 (defaultMaterialTag) \
111 (masked) \
112 (displayInOverlay) \
113 (translucentToSelection) \
114 (additive) \
115 (translucent) \
116 (volume)
117
118#define HDST_SDR_METADATA_TOKENS \
119 (swizzle)
120
121#define HDST_PERF_TOKENS \
122 (copyBufferGpuToGpu) \
123 (copyBufferCpuToGpu) \
124 (drawItemsCacheHit) \
125 (drawItemsCacheMiss) \
126 (drawItemsCacheStale) \
127 (drawItemsFetched)
128
129#define HDST_NATIVE_IMPLICITS_TOKENS \
130 (sphere) \
131 (sphereRadius) \
132 (conicalFrustum) \
133 (conicalFrustumRadiusTop) \
134 (conicalFrustumRadiusBot) \
135 (conicalFrustumHeight) \
136 (conicalFrustumAxis) \
137 (capsule) \
138 (capsuleRadiusTop) \
139 (capsuleRadiusBot) \
140 (capsuleHeight) \
141 (capsuleAxis)
142
143TF_DECLARE_PUBLIC_TOKENS(HdStGLSLProgramTokens, HDST_API,
144 HDST_GLSL_PROGRAM_TOKENS);
145
146TF_DECLARE_PUBLIC_TOKENS(HdStTokens, HDST_API, HDST_TOKENS);
147
148TF_DECLARE_PUBLIC_TOKENS(HdStTextureTokens, HDST_API, HDST_TEXTURE_TOKENS);
149
150TF_DECLARE_PUBLIC_TOKENS(HdStRenderBufferTokens, HDST_API,
151 HDST_RENDER_BUFFER_TOKENS);
152
153TF_DECLARE_PUBLIC_TOKENS(HdStRenderSettingsTokens, HDST_API,
154 HDST_RENDER_SETTINGS_TOKENS);
155
156TF_DECLARE_PUBLIC_TOKENS(HdStDefaultTransparencyModeTokens, HDST_API,
157 HDST_DEFAULT_TRANSPARENCY_MODE_TOKENS);
158
159TF_DECLARE_PUBLIC_TOKENS(HdStMaterialTagTokens, HDST_API,
160 HDST_MATERIAL_TAG_TOKENS);
161
162TF_DECLARE_PUBLIC_TOKENS(HdStSdrMetadataTokens, HDST_API,
163 HDST_SDR_METADATA_TOKENS);
164
165TF_DECLARE_PUBLIC_TOKENS(HdStPerfTokens, HDST_API, HDST_PERF_TOKENS);
166
167TF_DECLARE_PUBLIC_TOKENS(HdStNativeImplicitsTokens, HDST_API,
168 HDST_NATIVE_IMPLICITS_TOKENS);
169
170PXR_NAMESPACE_CLOSE_SCOPE
171
172#endif //PXR_IMAGING_HD_ST_TOKENS_H
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.