-
Notifications
You must be signed in to change notification settings - Fork 20
/
GLSL.tmLanguage
256 lines (256 loc) · 9.89 KB
/
GLSL.tmLanguage
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>vs</string>
<string>fs</string>
<string>gs</string>
<string>vsh</string>
<string>fsh</string>
<string>gsh</string>
<string>vshader</string>
<string>fshader</string>
<string>gshader</string>
<string>vert</string>
<string>frag</string>
<string>geom</string>
<string>tesc</string>
<string>tese</string>
<string>comp</string>
<string>glsl</string>
<string>f.glsl</string>
<string>v.glsl</string>
<string>g.glsl</string>
<string>mesh</string>
<string>task</string>
<string>rgen</string>
<string>rint</string>
<string>rahit</string>
<string>rchit</string>
<string>rmiss</string>
<string>rcall</string>
</array>
<key>foldingStartMarker</key>
<string>/\*\*|\{\s*$</string>
<key>foldingStopMarker</key>
<string>\*\*/|^\s*\}</string>
<key>keyEquivalent</key>
<string>^~G</string>
<key>name</key>
<string>GLSL</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#literal</string>
</dict>
<dict>
<key>include</key>
<string>#operator</string>
</dict>
<dict>
<key>begin</key>
<string>/\*</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.block.begin.glsl</string>
</dict>
</dict>
<key>end</key>
<string>\*/</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.block.end.glsl</string>
</dict>
</dict>
<key>name</key>
<string>comment.block.glsl</string>
</dict>
<dict>
<key>begin</key>
<string>//</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.glsl</string>
</dict>
</dict>
<key>end</key>
<string>\n</string>
<key>name</key>
<string>comment.line.double-slash.glsl</string>
</dict>
<dict>
<key>match</key>
<string>^\s*#\s*(define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b</string>
<key>name</key>
<string>keyword.directive.preprocessor.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(__LINE__|__FILE__|__VERSION__|GL_core_profile|GL_es_profile|GL_compatibility_profile)\b</string>
<key>name</key>
<string>constant.macro.predefined.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(precision|highp|mediump|lowp)</string>
<key>name</key>
<string>storage.modifier.precision.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(break|case|continue|default|discard|do|else|for|if|return|switch|while)\b</string>
<key>name</key>
<string>keyword.control.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(void|bool|int|uint|float|double|vec[2|3|4]|dvec[2|3|4]|bvec[2|3|4]|ivec[2|3|4]|uvec[2|3|4]|mat[2|3|4]|mat2x2|mat2x3|mat2x4|mat3x2|mat3x3|mat3x4|mat4x2|mat4x3|mat4x4|dmat2|dmat3|dmat4|dmat2x2|dmat2x3|dmat2x4|dmat3x2|dmat3x3|dmat3x4|dmat4x2|dmat4x3|dmat4x4|sampler[1|2|3]D|image[1|2|3]D|samplerCube|imageCube|sampler2DRect|image2DRect|sampler[1|2]DArray|image[1|2]DArray|samplerBuffer|imageBuffer|sampler2DMS|image2DMS|sampler2DMSArray|image2DMSArray|samplerCubeArray|imageCubeArray|sampler[1|2]DShadow|sampler2DRectShadow|sampler[1|2]DArrayShadow|samplerCubeShadow|samplerCubeArrayShadow|isampler[1|2|3]D|iimage[1|2|3]D|isamplerCube|iimageCube|isampler2DRect|iimage2DRect|isampler[1|2]DArray|iimage[1|2]DArray|isamplerBuffer|iimageBuffer|isampler2DMS|iimage2DMS|isampler2DMSArray|iimage2DMSArray|isamplerCubeArray|iimageCubeArray|atomic_uint|usampler[1|2|3]D|uimage[1|2|3]D|usamplerCube|uimageCube|usampler2DRect|uimage2DRect|usampler[1|2]DArray|uimage[1|2]DArray|usamplerBuffer|uimageBuffer|usampler2DMS|uimage2DMS|usampler2DMSArray|uimage2DMSArray|usamplerCubeArray|uimageCubeArray|struct)\b</string>
<key>name</key>
<string>storage.type.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(layout|attribute|centroid|sampler|patch|const|flat|in|inout|invariant|noperspective|out|smooth|uniform|varying|buffer|shared|coherent|readonly|writeonly|volatile|restrict)\b</string>
<key>name</key>
<string>storage.modifier.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(gl_BackColor|gl_BackLightModelProduct|gl_BackLightProduct|gl_BackMaterial|gl_BackSecondaryColor|gl_ClipDistance|gl_ClipPlane|gl_ClipVertex|gl_Color|gl_DepthRange|gl_DepthRangeParameters|gl_EyePlaneQ|gl_EyePlaneR|gl_EyePlaneS|gl_EyePlaneT|gl_Fog|gl_FogCoord|gl_FogFragCoord|gl_FogParameters|gl_FragColor|gl_FragCoord|gl_FragData|gl_FragDepth|gl_FrontColor|gl_FrontFacing|gl_FrontLightModelProduct|gl_FrontLightProduct|gl_FrontMaterial|gl_FrontSecondaryColor|gl_InstanceID|gl_Layer|gl_LightModel|gl_LightModelParameters|gl_LightModelProducts|gl_LightProducts|gl_LightSource|gl_LightSourceParameters|gl_MaterialParameters|gl_ModelViewMatrix|gl_ModelViewMatrixInverse|gl_ModelViewMatrixInverseTranspose|gl_ModelViewMatrixTranspose|gl_ModelViewProjectionMatrix|gl_ModelViewProjectionMatrixInverse|gl_ModelViewProjectionMatrixInverseTranspose|gl_ModelViewProjectionMatrixTranspose|gl_MultiTexCoord[0-7]|gl_Normal|gl_NormalMatrix|gl_NormalScale|gl_ObjectPlaneQ|gl_ObjectPlaneR|gl_ObjectPlaneS|gl_ObjectPlaneT|gl_Point|gl_PointCoord|gl_PointParameters|gl_PointSize|gl_Position|gl_PrimitiveIDIn|gl_ProjectionMatrix|gl_ProjectionMatrixInverse|gl_ProjectionMatrixInverseTranspose|gl_ProjectionMatrixTranspose|gl_SecondaryColor|gl_TexCoord|gl_TextureEnvColor|gl_TextureMatrix|gl_TextureMatrixInverse|gl_TextureMatrixInverseTranspose|gl_TextureMatrixTranspose|gl_Vertex|gl_VertexID)\b</string>
<key>name</key>
<string>support.variable.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(gl_MaxClipPlanes|gl_MaxCombinedTextureImageUnits|gl_MaxDrawBuffers|gl_MaxFragmentUniformComponents|gl_MaxLights|gl_MaxTextureCoords|gl_MaxTextureImageUnits|gl_MaxTextureUnits|gl_MaxVaryingFloats|gl_MaxVertexAttribs|gl_MaxVertexTextureImageUnits|gl_MaxVertexUniformComponents)\b</string>
<key>name</key>
<string>support.constant.glsl</string>
</dict>
<dict>
<key>match</key>
<string>\b(abs|acos|all|any|asin|atan|ceil|clamp|cos|cross|degrees|dFdx|dFdy|distance|dot|equal|exp|exp2|faceforward|floor|fract|ftransform|fwidth|greaterThan|greaterThanEqual|inversesqrt|length|lessThan|lessThanEqual|log|log2|matrixCompMult|max|min|mix|mod|noise[1-4]|normalize|not|notEqual|outerProduct|pow|radians|reflect|refract|shadow1D|shadow1DLod|shadow1DProj|shadow1DProjLod|shadow2D|shadow2DLod|shadow2DProj|shadow2DProjLod|sign|sin|smoothstep|sqrt|step|tan|texture1D|texture1DLod|texture1DProj|texture1DProjLod|texture2D|texture2DLod|texture2DProj|texture2DProjLod|texture3D|texture3DLod|texture3DProj|texture3DProjLod|textureCube|textureCubeLod|transpose)\b</string>
<key>name</key>
<string>support.function.glsl</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>literal</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
</array>
</dict>
<key>operator</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#arithmetic-operator</string>
</dict>
<dict>
<key>include</key>
<string>#increment-decrement-operator</string>
</dict>
<dict>
<key>include</key>
<string>#bitwise-operator</string>
</dict>
<dict>
<key>include</key>
<string>#comparative-operator</string>
</dict>
<dict>
<key>include</key>
<string>#assignment-operator</string>
</dict>
<dict>
<key>include</key>
<string>#logical-operator</string>
</dict>
<dict>
<key>include</key>
<string>#ternary-operator</string>
</dict>
</array>
</dict>
<key>numeric-literal</key>
<dict>
<key>match</key>
<string>\b([0-9][0-9_]*)(\.([0-9][0-9_]*))?([eE][+/-]?([0-9][0-9_]*))?\b</string>
<key>name</key>
<string>constant.numeric.glsl</string>
</dict>
<key>arithmetic-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])(\+|\-|\*|\/|\%)(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.arithmetic.glsl</string>
</dict>
<key>increment-decrement-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])(\+\+|\-\-)(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.increment-or-decrement.glsl</string>
</dict>
<key>bitwise-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])(~|&|\||\^|<<|>>)(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.bitwise.glsl</string>
</dict>
<key>assignment-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])(\+|\-|\*|\%|\/|<<|>>|&|\^|\|)?=(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.assignment.glsl</string>
</dict>
<key>comparative-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])((=|!)=|(<|>)=?)(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.comparative.glsl</string>
</dict>
<key>logical-operator</key>
<dict>
<key>match</key>
<string>(?<![/=\-+!*%<>&|\^~.])(!|&&|\|\||\^\^)(?![/=\-+!*%<>&|^~.])</string>
<key>name</key>
<string>keyword.operator.arithmetic.glsl</string>
</dict>
<key>ternary-operator</key>
<dict>
<key>match</key>
<string>(\?|:)</string>
<key>name</key>
<string>keyword.operator.ternary.glsl</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.glsl</string>
<key>uuid</key>
<string>D0FD1B52-F137-4FBA-A148-B8A893CD948C</string>
</dict>
</plist>