Renderman Shading Language (abbreviated RSL) is a component of the
RenderMan Interface Specification
The RenderMan Interface Specification, or RISpec in short, is an open API developed by Pixar Animation Studios to describe three-dimensional scenes and turn them into digital photorealistic images. It includes the RenderMan Shading Language.
A ...
, 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 s ...
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, Sitexgraphics' Air or an open source solution such as Pixie 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 (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
operator ".":
float length (vector v)
Further reading
*
*
*
External links
Shading Language (RSL) documentation
{{graphics-software-stub
RenderMan
Shading languages
zh:RenderMan规范#RenderMan着色语言(RSL)