-
Notifications
You must be signed in to change notification settings - Fork 0
/
RibGlue.h
223 lines (159 loc) · 5.16 KB
/
RibGlue.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/*
* RibGlue.h
* MacRib
*
* Created by flip phillips on 6/2/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
* $Id: RibGlue.h 22 2007-06-03 04:24:18Z flip $
*
*/
// how to map from options to types in RiOption calls
// probably need for other things too, but for now, that's how we'll do it
//
typedef enum {
tOption,
tImager,
tHider,
tDisplay,
tPixelFilter,
tAttribute,
tGeometricApproximation
} catList;
typedef enum {
tInt,
tFloat,
tIntArray2,
tIntArray3,
tIntArray4,
tFloatArray2,
tFloatArray3,
tFloatArray4,
tString,
tStringArray,
tNone
} typeList;
typedef struct {
catList ctype;
char* name;
char* token;
typeList vtype;
} optType;
//
//
// NB - I started this but have decided on a different approach wherein
// the type of list in rMan is what gives us what we want- that is
// its up to you to make sure you have the right type
//
//
optType kOptionTable[] = {
//options
{tOption, "bucket", "order", tString},
{tOption, "limits", "bucketsize", tIntArray2},
{tOption, "limits", "gridsize", tInt},
{tOption, "limits", "texturememory", tInt},
{tOption, "limits", "brickmemory", tInt},
{tOption, "limits", "deepshadowtiles", tInt},
{tOption, "limits", "geocachememory", tInt},
{tOption, "limits", "zthreshold", tFloatArray3},
{tOption, "limits", "othreshold", tFloatArray3},
{tOption, "rib", "format", tString},
{tOption, "ribparse", "varsubst", tString},
{tOption, "searchpath", "shader", tString},
{tOption, "searchpath", "texture", tString},
{tOption, "searchpath", "vfxmaster", tString},
{tOption, "searchpath", "vfxinstance", tString},
{tOption, "searchpath", "display", tString},
{tOption, "searchpath", "archive", tString},
{tOption, "searchpath", "procedural", tString},
{tOption, "searchpath", "resource", tString},
{tOption, "searchpath", "servershader", tString},
{tOption, "searchpath", "servertexture", tString},
{tOption, "searchpath", "servervfxmaster", tString},
{tOption, "searchpath", "servervfxinstance", tString},
{tOption, "searchpath", "serverdisplay", tString},
{tOption, "searchpath", "serverarchive", tString},
{tOption, "searchpath", "serverresource", tString},
{tOption, "searchpath", "dirmap", tString},
{tOption, "shading", "debug", tInt},
{tOption, "shading", "checknans", tInt},
{tOption, "shading", "objectcache", tFloat},
{tOption, "shadow", "bias", tFloat},
{tOption, "shutter", "offset", tFloat},
{tOption, "shutter", "clampmotion", tInt},
{tOption, "statistics", "endofframe", tInt},
{tOption, "statistics", "filename", tString},
{tOption, "statistics", "xmlfilename", tString},
{tOption, "statistics", "stylesheet", tString},
{tOption, "statistics", "shaderprofile", tString},
{tOption, "statistics", "displace_ratios", tFloat2},
{tOption, "texture", "enable gaussian", tFloat},
{tOption, "texture", "enable lerp", tFloat},
{tOption, "texture", "texturefilter", tString},
{tOption, "trace", "maxdepth", tInt},
{tOption, "trace", "specularthreshold", tFloat},
{tOption, "user", "", tString},
//attributes
{tAttribute, "cull", "backfacing", tInt},
{tAttribute, "cull", "hidden", tInt},
{tAttribute, "derivatives" "centered", tInt},
{tAttribute, "derivatives" "extrapolate", tInt},
{tAttribute, "dice", "binary", tInt},
{tAttribute, "dice", "hair", tInt},
{tAttribute, "dice", "rasterorient", tInt},
{tAttribute, "dice", "strategy", tString},
{tAttribute, "dice", "referencecamera", tString},
{tAttribute, "displacementbound", "sphere", tFloat},
{tAttribute, "displacementbound", "coordinatesystem", tString},
{tAttribute, "grouping", "membership", tString},
{tAttribute, "stochastic", "sigma", tInt},
{tAttribute, "stochastic", "pointfalloff", tInt},
{tAttribute, "identifier", "name", tString},
/*
Attribute "irradiance "float maxerror" [f]
"float maxpixeldist" [f]
Attribute "photon" "int estimator" [i]
"string causticmap" [s]
"string globalmap" [s]
"string shadingmodel" [s]
Attribute "sides" "float backfacetolerance" [f]
"int doubleshaded" [b]
Attribute "shade" "string strategy" [s]
"string volumeintersectionstrategy" [s]
"float volumeintersectionpriority" [f]
"string diffusehitmode" [s]
"string specularhitmode" [s]
"string transmissionhitmode" [s]
"string camerahitmode" [s]
"relativeshadingrate" [f]
"resetrelativeshadingrate" [f]
Attribute "stitch" "int enable" [b]
"int traceenable" [b]
"int newgroup" [b]
Attribute "trace" "int maxdiffusedepth" [i]
"int maxspeculardepth" [i]
"int displacements" [b]
"float bias" [f]
"int samplemotion" [b]
Attribute "trimcurve" "string sense" [s]
Attribute "user" "myattribute" [x]
Attribute "visibility" "int camera" [v]
"int diffuse" [b]
"int specular" [b]
"int transmission" [b]
"int photon" [b]
"int midpoint" [b]
GeometricApproximation "float motionfactor" f
Attribute "procedural" "string attributes" [s]
*/
//imagers
{tImager, "name", "", tNone},
//hiders
{tHider, "photon", "", tNone},
{tHider, "depthmask", "zfile", tString},
{tHider, "depthmask", "reversesign", tInt},
{tHider, "depthmask", "depthbias", tFloat}
//pixel filters need something special
//displays need something special
};
// for other things