rsl.js 1.4 KB

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