HOME

TheInfoList



OR:

Renderman Shading Language (abbreviated RSL) is a component of the RenderMan Interface Specification, and is used to define
shader In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of a 3D scene - a process known as '' shading''. Shaders have evolved to perform a variety of spec ...
s. The language syntax is C-like. A shader written in RSL can be used without changes on any RenderMan-compliant renderer, such as Pixar's PhotoRealistic RenderMan, DNA Research's
3Delight 3Delight, also known as 3DelightNSI, is 3D computer graphics software that runs on Microsoft Windows, MacOS and Linux. It is developed by Illumination Research. It is both a photorealistic and NPR path tracing offline renderer based on its ...
, Sitexgraphics' Air or an open source solution such as
Pixie A pixie (also pisky, pixy, pixi, pizkie, and piskie in Cornwall and Devon, and pigsie or puggsy in the New Forest) is a mythical creature of British folklore. Pixies are considered to be particularly concentrated in the high moorland areas ar ...
or Aqsis. RenderMan Shading Language defines standalone functions and five types of shaders: surface, light, volume, imager and displacement shaders. An example of a surface shader that defines a metal surface is: surface metal (float Ka = 1; float Ks = 1; float roughness = 0.1;) Shaders express their work by reading and writing special variables such as Cs (surface color), N (normal at given point), and Ci (final surface color). The arguments to the shaders are global parameters that are attached to objects of the model (so one metal shader can be used for different metals and so on). Shaders have no return values, but functions can be defined which take arguments and return a value. For example, the following function computes vector length using the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
operator ".": float length (vector v)


Further reading

* * *


External links


Shading Language (RSL) documentation
RenderMan Shading languages {{graphics-software-stub zh:RenderMan规范#RenderMan着色语言(RSL)