glsl.syntax 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. # GLSL syntax file
  2. # Authors:
  3. # Sergey Sharybin <sergey.vfx@gmail.com>
  4. #
  5. # Based on glsl-mode.el from
  6. # Xavier.Decoret@imag.fr
  7. # Jim Hourihan <jimhourihan ~at~ gmail.com>
  8. context default
  9. # Types
  10. keyword whole float yellow
  11. keyword whole double yellow
  12. keyword whole int yellow
  13. keyword whole void yellow
  14. keyword whole bool yellow
  15. keyword whole true yellow
  16. keyword whole false yellow
  17. keyword whole mat2 yellow
  18. keyword whole mat3 yellow
  19. keyword whole mat4 yellow
  20. keyword whole dmat2 yellow
  21. keyword whole dmat3 yellow
  22. keyword whole dmat4 yellow
  23. keyword whole mat2x2 yellow
  24. keyword whole mat2x3 yellow
  25. keyword whole mat2x4 yellow
  26. keyword whole dmat2x2 yellow
  27. keyword whole dmat2x3 yellow
  28. keyword whole dmat2x4 yellow
  29. keyword whole mat3x2 yellow
  30. keyword whole mat3x3 yellow
  31. keyword whole mat3x4 yellow
  32. keyword whole dmat3x2 yellow
  33. keyword whole dmat3x3 yellow
  34. keyword whole dmat3x4 yellow
  35. keyword whole mat4x2 yellow
  36. keyword whole mat4x3 yellow
  37. keyword whole mat4x4 yellow
  38. keyword whole dmat4x2 yellow
  39. keyword whole dmat4x3 yellow
  40. keyword whole dmat4x4 yellow
  41. keyword whole vec2 yellow
  42. keyword whole vec3 yellow
  43. keyword whole vec4 yellow
  44. keyword whole ivec2 yellow
  45. keyword whole ivec3 yellow
  46. keyword whole ivec4 yellow
  47. keyword whole bvec2 yellow
  48. keyword whole bvec3 yellow
  49. keyword whole bvec4 yellow
  50. keyword whole dvec2 yellow
  51. keyword whole dvec3 yellow
  52. keyword whole dvec4 yellow
  53. keyword whole uint yellow
  54. keyword whole uvec2 yellow
  55. keyword whole uvec3 yellow
  56. keyword whole uvec4 yellow
  57. keyword whole sampler1D yellow
  58. keyword whole sampler2D yellow
  59. keyword whole sampler3D yellow
  60. keyword whole samplerCube yellow
  61. keyword whole sampler1DShadow yellow
  62. keyword whole sampler2DShadow yellow
  63. keyword whole samplerCubeShadow yellow
  64. keyword whole sampler1DArray yellow
  65. keyword whole sampler2DArray yellow
  66. keyword whole sampler1DArrayShadow yellow
  67. keyword whole sampler2DArrayShadow yellow
  68. keyword whole isampler1D yellow
  69. keyword whole isampler2D yellow
  70. keyword whole isampler3D yellow
  71. keyword whole isamplerCube yellow
  72. keyword whole isampler1DArray yellow
  73. keyword whole isampler2DArray yellow
  74. keyword whole usampler1D yellow
  75. keyword whole usampler2D yellow
  76. keyword whole usampler3D yellow
  77. keyword whole usamplerCube yellow
  78. keyword whole usampler1DArray yellow
  79. keyword whole usampler2DArray yellow
  80. keyword whole sampler2DRect yellow
  81. keyword whole sampler2DRectShadow yellow
  82. keyword whole isampler2DRect yellow
  83. keyword whole usampler2DRect yellow
  84. keyword whole samplerBuffer yellow
  85. keyword whole isamplerBuffer yellow
  86. keyword whole usamplerBuffer yellow
  87. keyword whole sampler2DMS yellow
  88. keyword whole isampler2DMS yellow
  89. keyword whole usampler2DMS yellow
  90. keyword whole sampler2DMSArray yellow
  91. keyword whole isampler2DMSArray yellow
  92. keyword whole usampler2DMSArray yellow
  93. keyword whole samplerCubeArray yellow
  94. keyword whole samplerCubeArrayShadow yellow
  95. keyword whole isamplerCubeArray yellow
  96. keyword whole usamplerCubeArray yellow
  97. keyword whole image1D yellow
  98. keyword whole iimage1D yellow
  99. keyword whole uimage1D yellow
  100. keyword whole image2D yellow
  101. keyword whole iimage2D yellow
  102. keyword whole uimage2D yellow
  103. keyword whole image3D yellow
  104. keyword whole iimage3D yellow
  105. keyword whole uimage3D yellow
  106. keyword whole image2DRect yellow
  107. keyword whole iimage2DRect yellow
  108. keyword whole uimage2DRect yellow
  109. keyword whole imageCube yellow
  110. keyword whole iimageCube yellow
  111. keyword whole uimageCube yellow
  112. keyword whole imageBuffer yellow
  113. keyword whole iimageBuffer yellow
  114. keyword whole uimageBuffer yellow
  115. keyword whole image1DArray yellow
  116. keyword whole iimage1DArray yellow
  117. keyword whole uimage1DArray yellow
  118. keyword whole image2DArray yellow
  119. keyword whole iimage2DArray yellow
  120. keyword whole uimage2DArray yellow
  121. keyword whole imageCubeArray yellow
  122. keyword whole iimageCubeArray yellow
  123. keyword whole uimageCubeArray yellow
  124. keyword whole image2DMS yellow
  125. keyword whole iimage2DMS yellow
  126. keyword whole uimage2DMS yellow
  127. keyword whole image2DMSArray yellow
  128. keyword whole iimage2DMSArray yellow
  129. keyword whole uimage2DMSArray yellow
  130. keyword whole long yellow
  131. keyword whole short yellow
  132. keyword whole half yellow
  133. keyword whole fixed yellow
  134. keyword whole unsigned yellow
  135. keyword whole hvec2 yellow
  136. keyword whole hvec3 yellow
  137. keyword whole hvec4 yellow
  138. keyword whole fvec2 yellow
  139. keyword whole fvec3 yellow
  140. keyword whole fvec4 yellow
  141. keyword whole sampler3DRect yellow
  142. # Modifiers
  143. keyword whole attribute yellow
  144. keyword whole const yellow
  145. keyword whole uniform yellow
  146. keyword whole varying yellow
  147. keyword whole buffer yellow
  148. keyword whole shared yellow
  149. keyword whole coherent yellow
  150. keyword whole volatile yellow
  151. keyword whole restrict yellow
  152. keyword whole readonly yellow
  153. keyword whole writeonly yellow
  154. keyword whole atomic_uint yellow
  155. keyword whole layout yellow
  156. keyword whole centroid yellow
  157. keyword whole flat yellow
  158. keyword whole smooth yellow
  159. keyword whole noperspective yellow
  160. keyword whole patch yellow
  161. keyword whole sample yellow
  162. keyword whole break yellow
  163. keyword whole continue yellow
  164. keyword whole do yellow
  165. keyword whole for yellow
  166. keyword whole while yellow
  167. keyword whole switch yellow
  168. keyword whole case yellow
  169. keyword whole default yellow
  170. keyword whole if yellow
  171. keyword whole else yellow
  172. keyword whole subroutine yellow
  173. keyword whole in yellow
  174. keyword whole out yellow
  175. keyword whole inout yellow
  176. keyword whole invariant yellow
  177. keyword whole discard yellow
  178. keyword whole return yellow
  179. keyword whole lowp yellow
  180. keyword whole mediump yellow
  181. keyword whole highp yellow
  182. keyword whole precision yellow
  183. keyword whole struct yellow
  184. keyword whole common yellow
  185. keyword whole partition yellow
  186. keyword whole active yellow
  187. keyword whole asm yellow
  188. keyword whole class yellow
  189. keyword whole union yellow
  190. keyword whole enum yellow
  191. keyword whole typedef yellow
  192. keyword whole template yellow
  193. keyword whole this yellow
  194. keyword whole packed yellow
  195. keyword whole resource yellow
  196. keyword whole goto yellow
  197. keyword whole inline yellow
  198. keyword whole noinline yellow
  199. keyword whole public yellow
  200. keyword whole static yellow
  201. keyword whole extern yellow
  202. keyword whole external yellow
  203. keyword whole interface yellow
  204. keyword whole superp yellow
  205. keyword whole input yellow
  206. keyword whole output yellow
  207. keyword whole filter yellow
  208. keyword whole sizeof yellow
  209. keyword whole cast yellow
  210. keyword whole namespace yellow
  211. keyword whole using yellow
  212. keyword whole row_major yellow
  213. keyword whole early_fragment_tests yellow
  214. # Deprecated
  215. keyword whole varying brightred
  216. keyword whole attribute brightred
  217. # Built-in
  218. keyword whole abs brightmagenta
  219. keyword whole acos brightmagenta
  220. keyword whole acosh brightmagenta
  221. keyword whole all brightmagenta
  222. keyword whole any brightmagenta
  223. keyword whole asin brightmagenta
  224. keyword whole asinh brightmagenta
  225. keyword whole atan brightmagenta
  226. keyword whole atanh brightmagenta
  227. keyword whole atomicCounter brightmagenta
  228. keyword whole atomicCounterDecrement brightmagenta
  229. keyword whole atomicCounterIncrement brightmagenta
  230. keyword whole barrier brightmagenta
  231. keyword whole bitCount brightmagenta
  232. keyword whole bitfieldExtract brightmagenta
  233. keyword whole bitfieldInsert brightmagenta
  234. keyword whole bitfieldReverse brightmagenta
  235. keyword whole ceil brightmagenta
  236. keyword whole clamp brightmagenta
  237. keyword whole cos brightmagenta
  238. keyword whole cosh brightmagenta
  239. keyword whole cross brightmagenta
  240. keyword whole degrees brightmagenta
  241. keyword whole determinant brightmagenta
  242. keyword whole dFdx brightmagenta
  243. keyword whole dFdy brightmagenta
  244. keyword whole dFdyFine brightmagenta
  245. keyword whole dFdxFine brightmagenta
  246. keyword whole dFdyCoarse brightmagenta
  247. keyword whole dFdxCourse brightmagenta
  248. keyword whole fwidthFine brightmagenta
  249. keyword whole fwidthCoarse brightmagenta
  250. keyword whole distance brightmagenta
  251. keyword whole dot brightmagenta
  252. keyword whole EmitStreamVertex brightmagenta
  253. keyword whole EmitVertex brightmagenta
  254. keyword whole EndPrimitive brightmagenta
  255. keyword whole EndStreamPrimitive brightmagenta
  256. keyword whole equal brightmagenta
  257. keyword whole exp brightmagenta
  258. keyword whole exp2 brightmagenta
  259. keyword whole faceforward brightmagenta
  260. keyword whole findLSB brightmagenta
  261. keyword whole findMSB brightmagenta
  262. keyword whole floatBitsToInt brightmagenta
  263. keyword whole floatBitsToUint brightmagenta
  264. keyword whole floor brightmagenta
  265. keyword whole fma brightmagenta
  266. keyword whole fract brightmagenta
  267. keyword whole frexp brightmagenta
  268. keyword whole fwidth brightmagenta
  269. keyword whole greaterThan brightmagenta
  270. keyword whole greaterThanEqual brightmagenta
  271. keyword whole imageAtomicAdd brightmagenta
  272. keyword whole imageAtomicAnd brightmagenta
  273. keyword whole imageAtomicCompSwap brightmagenta
  274. keyword whole imageAtomicExchange brightmagenta
  275. keyword whole imageAtomicMax brightmagenta
  276. keyword whole imageAtomicMin brightmagenta
  277. keyword whole imageAtomicOr brightmagenta
  278. keyword whole imageAtomicXor brightmagenta
  279. keyword whole imageLoad brightmagenta
  280. keyword whole imageSize brightmagenta
  281. keyword whole imageStore brightmagenta
  282. keyword whole imulExtended brightmagenta
  283. keyword whole intBitsToFloat brightmagenta
  284. keyword whole imageSamples brightmagenta
  285. keyword whole interpolateAtCentroid brightmagenta
  286. keyword whole interpolateAtOffset brightmagenta
  287. keyword whole interpolateAtSample brightmagenta
  288. keyword whole inverse brightmagenta
  289. keyword whole inversesqrt brightmagenta
  290. keyword whole isinf brightmagenta
  291. keyword whole isnan brightmagenta
  292. keyword whole ldexp brightmagenta
  293. keyword whole length brightmagenta
  294. keyword whole lessThan brightmagenta
  295. keyword whole lessThanEqual brightmagenta
  296. keyword whole log brightmagenta
  297. keyword whole log2 brightmagenta
  298. keyword whole matrixCompMult brightmagenta
  299. keyword whole max brightmagenta
  300. keyword whole memoryBarrier brightmagenta
  301. keyword whole min brightmagenta
  302. keyword whole mix brightmagenta
  303. keyword whole mod brightmagenta
  304. keyword whole modf brightmagenta
  305. keyword whole noise brightmagenta
  306. keyword whole normalize brightmagenta
  307. keyword whole not brightmagenta
  308. keyword whole notEqual brightmagenta
  309. keyword whole outerProduct brightmagenta
  310. keyword whole packDouble2x32 brightmagenta
  311. keyword whole packHalf2x16 brightmagenta
  312. keyword whole packSnorm2x16 brightmagenta
  313. keyword whole packSnorm4x8 brightmagenta
  314. keyword whole packUnorm2x16 brightmagenta
  315. keyword whole packUnorm4x8 brightmagenta
  316. keyword whole pow brightmagenta
  317. keyword whole radians brightmagenta
  318. keyword whole reflect brightmagenta
  319. keyword whole refract brightmagenta
  320. keyword whole round brightmagenta
  321. keyword whole roundEven brightmagenta
  322. keyword whole sign brightmagenta
  323. keyword whole sin brightmagenta
  324. keyword whole sinh brightmagenta
  325. keyword whole smoothstep brightmagenta
  326. keyword whole sqrt brightmagenta
  327. keyword whole step brightmagenta
  328. keyword whole tan brightmagenta
  329. keyword whole tanh brightmagenta
  330. keyword whole texelFetch brightmagenta
  331. keyword whole texelFetchOffset brightmagenta
  332. keyword whole texture brightmagenta
  333. keyword whole textureGather brightmagenta
  334. keyword whole textureGatherOffset brightmagenta
  335. keyword whole textureGatherOffsets brightmagenta
  336. keyword whole textureGrad brightmagenta
  337. keyword whole textureGradOffset brightmagenta
  338. keyword whole textureLod brightmagenta
  339. keyword whole textureLodOffset brightmagenta
  340. keyword whole textureOffset brightmagenta
  341. keyword whole textureProj brightmagenta
  342. keyword whole textureProjGrad brightmagenta
  343. keyword whole textureProjGradOffset brightmagenta
  344. keyword whole textureProjLod brightmagenta
  345. keyword whole textureProjLodOffset brightmagenta
  346. keyword whole textureProjOffset brightmagenta
  347. keyword whole textureQueryLevels brightmagenta
  348. keyword whole textureQueryLod brightmagenta
  349. keyword whole textureSize brightmagenta
  350. keyword whole transpose brightmagenta
  351. keyword whole trunc brightmagenta
  352. keyword whole uaddCarry brightmagenta
  353. keyword whole uintBitsToFloat brightmagenta
  354. keyword whole umulExtended brightmagenta
  355. keyword whole unpackDouble2x32 brightmagenta
  356. keyword whole unpackHalf2x16 brightmagenta
  357. keyword whole unpackSnorm2x16 brightmagenta
  358. keyword whole unpackSnorm4x8 brightmagenta
  359. keyword whole unpackUnorm2x16 brightmagenta
  360. keyword whole unpackUnorm4x8 brightmagenta
  361. keyword whole usubBorrow brightmagenta
  362. # Deprecated built-in
  363. keyword whole texture1D magenta
  364. keyword whole texture1DProj magenta
  365. keyword whole texture1DLod magenta
  366. keyword whole texture1DProjLod magenta
  367. keyword whole texture2D magenta
  368. keyword whole texture2DProj magenta
  369. keyword whole texture2DLod magenta
  370. keyword whole texture2DProjLod magenta
  371. keyword whole texture2DRect magenta
  372. keyword whole texture2DRectProj magenta
  373. keyword whole texture3D magenta
  374. keyword whole texture3DProj magenta
  375. keyword whole texture3DLod magenta
  376. keyword whole texture3DProjLod magenta
  377. keyword whole shadow1D magenta
  378. keyword whole shadow1DProj magenta
  379. keyword whole shadow1DLod magenta
  380. keyword whole shadow1DProjLod magenta
  381. keyword whole shadow2D magenta
  382. keyword whole shadow2DProj magenta
  383. keyword whole shadow2DLod magenta
  384. keyword whole shadow2DProjLod magenta
  385. keyword whole textureCube magenta
  386. keyword whole textureCubeLod magenta
  387. # Deprecated variables
  388. keyword whole gl_FragColor red
  389. keyword whole gl_FragData red
  390. keyword whole gl_MaxVarying red
  391. keyword whole gl_MaxVaryingFloats red
  392. keyword whole gl_MaxVaryingComponents red
  393. # Comments
  394. keyword /\* brown
  395. keyword \*/ brown
  396. keyword // brown
  397. # Preprocessor
  398. keyword # brightred
  399. # Punctuation
  400. keyword > white
  401. keyword < white
  402. keyword \+ white
  403. keyword - white
  404. keyword \* white
  405. keyword / white
  406. keyword % white
  407. keyword = white
  408. keyword != white
  409. keyword == white
  410. keyword & white
  411. keyword | white
  412. keyword :: white
  413. keyword -> white
  414. keyword { brightcyan
  415. keyword } brightcyan
  416. keyword ( brightcyan
  417. keyword ) brightcyan
  418. keyword [ brightcyan
  419. keyword ] brightcyan
  420. keyword , brightcyan
  421. keyword : brightcyan
  422. keyword ; brightmagenta
  423. context exclusive # \n brightred
  424. keyword \\\n yellow
  425. keyword /\**\*/ brown
  426. keyword //*\n brown
  427. keyword "+" red
  428. keyword <+> red
  429. context exclusive /\* \*/ brown
  430. spellcheck
  431. context exclusive // \n brown
  432. spellcheck
  433. context " " green
  434. spellcheck
  435. context ' ' brightgreen
  436. spellcheck