-
Notifications
You must be signed in to change notification settings - Fork 0
/
HLSL.syn
428 lines (420 loc) · 4.58 KB
/
HLSL.syn
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
; TextPad syntax definition for HLSL
; Might wanna modify it a bit, but has all the keywords and is fairly well seperated
C=1
[Syntax]
Namespace1 = 6
IgnoreCase = No
KeyWordLength =
BracketChars = {[()]}
OperatorChars = -+*/<>!~%^&|=#@
PreprocStart = #
SyntaxStart =
SyntaxEnd =
HexPrefix = 0x
CommentStart = /*
CommentEnd = */
CommentStartAlt =
CommentEndAlt =
SingleComment = //
SingleCommentCol =
SingleCommentAlt =;
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt =
StringEsc = \
CharStart = '
CharEnd = '
CharEsc = \
[Preprocessor keywords]
#define
#elif
#else
#endif
#error
#if
#ifdef
#ifndef
#include
#line
#pragma
#undef
defined
[Keywords 1]
; Storage class modifiers
extern
shared
static
uniform
volatile
; Type modifiers
const
row_major
column_major
; Basic types
BOOL
bool
int
half
float
double
sampler
struct
string
; Preprocessor words
pack_matrix
warning
def
once
default
disable
error
vs
vs_1_1
vs_2_0
vs_2_a
ps
ps_1_1
ps_1_2
ps_1_3
ps_1_4
ps_2_0
ps_2_a
__FILE__
__LINE__
; Other words
asm
asm_fragment
compile
compile_fragment
discard
decl
do
else
false
for
if
in
inline
inout
out
pass
pixelfragment
return
register
sampler1D
sampler2D
sampler3D
samplerCUBE
sampler_state
shared
stateblock
stateblock_state
technique
texture
texture1D
texture2D
texture3D
textureCUBE
true
typedef
uniform
vertexfragment
void
volatile
while
; Reservd words (unused)
;auto break case catch
;char class const_cast continue
;default delete dynamic_cast enum
;explicit friend goto long
;mutable namespace new operator
;private protected public reinterpret_cast
;short signed sizeof static_cast
;switch template this throw
;try typename union unsigned
;using virtual
[Keywords 2]
; Vector types
bool1
bool2
bool3
bool4
BOOL1
BOOL2
BOOL3
BOOL4
int1
int2
int3
int4
half1
half2
half3
half4
float1
float2
float3
float4
double1
double2
double3
double4
; Alternate vector syntax
vector
; Matrix types
bool1x1
bool1x2
bool1x3
bool1x4
bool2x1
bool2x2
bool2x3
bool2x4
bool3x1
bool3x2
bool3x3
bool3x4
bool4x1
bool4x2
bool4x3
bool4x4
BOOL1x1
BOOL1x2
BOOL1x3
BOOL1x4
BOOL2x1
BOOL2x2
BOOL2x3
BOOL2x4
BOOL3x1
BOOL3x2
BOOL3x3
BOOL3x4
BOOL4x1
BOOL4x2
BOOL4x3
BOOL4x4
half1x1
half1x2
half1x3
half1x4
half2x1
half2x2
half2x3
half2x4
half3x1
half3x2
half3x3
half3x4
half4x1
half4x2
half4x3
half4x4
int1x1
int1x2
int1x3
int1x4
int2x1
int2x2
int2x3
int2x4
int3x1
int3x2
int3x3
int3x4
int4x1
int4x2
int4x3
int4x4
float1x1
float1x2
float1x3
float1x4
float2x1
float2x2
float2x3
float2x4
float3x1
float3x2
float3x3
float3x4
float4x1
float4x2
float4x3
float4x4
double1x1
double1x2
double1x3
double1x4
double2x1
double2x2
double2x3
double2x4
double3x1
double3x2
double3x3
double3x4
double4x1
double4x2
double4x3
double4x4
; Matrix alt syntax
matrix
; Shader types
vertexshader
pixelshader
[Keywords 3]
; Intrinsic functions
abs
acos
all
any
asin
atan
atan2
ceil
clamp
clip
cos
cosh
cross
D3DCOLORtoUBYTE4
ddx
ddy
degrees
determinant
distance
dot
exp
exp2
faceforward
floor
fmod
frac
frexp
fwidth
isfinite
isinf
isnan
ldexp
length
lerp
lit
log
log10
log2
max
min
modf
mul
noise
normalize
pow
radians
reflect
refract
round
rsqrt
saturate
sign
sin
sincos
sinh
smoothstep
sqrt
step
tan
tanh
tex1D
tex1D
tex1Dbias
tex1Dgrad
tex1Dlod
tex1Dproj
tex2D
tex2D
tex2Dbias
tex2Dgrad
tex2Dlod
tex2Dproj
tex3D
tex3D
tex3Dbias
tex3Dgrad
tex3Dlod
tex3Dproj
texCUBE
texCUBE
texCUBEbias
texCUBEgrad
texCUBElod
texCUBEproj
transpose
[Keywords 4]
: Vertex Shader input Symantics (defined levels up to 4)
BINORMAL0
BINORMAL1
BINORMAL2
BINORMAL3
BINORMAL4
BLENDINDICES0
BLENDINDICES1
BLENDINDICES2
BLENDINDICES3
BLENDINDICES4
BLENDWEIGHT0
BLENDWEIGHT1
BLENDWEIGHT2
BLENDWEIGHT3
BLENDWEIGHT4
COLOR0
COLOR1
COLOR2
COLOR3
COLOR4
NORMAL0
NORMAL1
NORMAL2
NORMAL3
NORMAL4
POSITION0
POSITION1
POSITION2
POSITION3
POSITION4
POSITIONT
PSIZE0
PSIZE1
PSIZE2
PSIZE3
PSIZE4
TANGENT0
TANGENT1
TANGENT2
TANGENT3
TANGENT4
TESSFACTOR0
TESSFACTOR1
TESSFACTOR2
TESSFACTOR3
TESSFACTOR4
TEXCOORD0
TEXCOORD1
TEXCOORD2
TEXCOORD3
TEXCOORD4
: Vertex Shader output Symantics (defined levels up to 4)
FOG
PSIZE
;Pixel Shader input Symantics (defined levels up to 4)
VFACE
VPOS
;Pixel Shader output Symantics (defined levels up to 4)
DEPTH0
DEPTH1
DEPTH2
DEPTH3
DEPTH4