rsl.js 1.3 KB

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