UNPKG

1.62 kBJavaScriptView Raw
1/*
2Language: RenderMan RSL
3Author: Konstantin Evdokimenko <qewerty@gmail.com>
4Contributors: Shuen-Huei Guan <drake.guan@gmail.com>
5Website: https://renderman.pixar.com/resources/RenderMan_20/shadingLanguage.html
6Category: graphics
7*/
8
9function rsl(hljs) {
10 return {
11 name: 'RenderMan RSL',
12 keywords: {
13 keyword:
14 'float color point normal vector matrix while for if do return else break extern continue',
15 built_in:
16 'abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise ' +
17 'clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp ' +
18 'faceforward filterstep floor format fresnel incident length lightsource log match ' +
19 'max min mod noise normalize ntransform opposite option phong pnoise pow printf ' +
20 'ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp ' +
21 'setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan ' +
22 'texture textureinfo trace transform vtransform xcomp ycomp zcomp'
23 },
24 illegal: '</',
25 contains: [
26 hljs.C_LINE_COMMENT_MODE,
27 hljs.C_BLOCK_COMMENT_MODE,
28 hljs.QUOTE_STRING_MODE,
29 hljs.APOS_STRING_MODE,
30 hljs.C_NUMBER_MODE,
31 {
32 className: 'meta',
33 begin: '#',
34 end: '$'
35 },
36 {
37 className: 'class',
38 beginKeywords: 'surface displacement light volume imager',
39 end: '\\('
40 },
41 {
42 beginKeywords: 'illuminate illuminance gather',
43 end: '\\('
44 }
45 ]
46 };
47}
48
49export { rsl as default };