l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

rsl.js (1588B)


      1 /*
      2 Language: RenderMan RSL
      3 Author: Konstantin Evdokimenko <qewerty@gmail.com>
      4 Contributors: Shuen-Huei Guan <drake.guan@gmail.com>
      5 Website: https://renderman.pixar.com/resources/RenderMan_20/shadingLanguage.html
      6 Category: graphics
      7 */
      8 
      9 function 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: '#', end: '$'
     34       },
     35       {
     36         className: 'class',
     37         beginKeywords: 'surface displacement light volume imager', end: '\\('
     38       },
     39       {
     40         beginKeywords: 'illuminate illuminance gather', end: '\\('
     41       }
     42     ]
     43   };
     44 }
     45 
     46 module.exports = rsl;