Shadeop is a term used in
computer graphics rendering to refer to an atomic, built-in
function used in a
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 ...
.
It is a
portmanteau
A portmanteau word, or portmanteau (, ) is a blend of words[shading
Shading refers to the depiction of depth perception in 3D models (within the field of 3D computer graphics) or illustrations (in visual art) by varying the level of darkness. Shading tries to approximate local behavior of light on the object ...](_blank)
and
operation
Operation or Operations may refer to:
Arts, entertainment and media
* ''Operation'' (game), a battery-operated board game that challenges dexterity
* Operation (music), a term used in musical set theory
* ''Operations'' (magazine), Multi-Man ...
.
Meaning in the RenderMan context
The term is specifically used in the context of shaders written in the
RenderMan Shading Language Renderman Shading Language (abbreviated RSL) is a component of the RenderMan Interface Specification, and is used to define shaders. The language syntax is C-like.
A shader written in RSL can be used without changes on any RenderMan-compliant ren ...
(RSL) for use with
RenderMan-compliant renderers.
User-defined functions written in RSL are just referred to as "functions". Hence, use of the term mostly serves as a means to distinguish the latter type from built-in type functions.
RSL also allows for binary plugins written in
C to be loaded and treated like built-in shadeops. These are commonly referred to as
DSO shadeops. Two RenderMan implementations,
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 ...
and
PhotoRealistic RenderMan
Pixar RenderMan (formerly PhotoRealistic RenderMan) is proprietary photorealistic 3D rendering software produced by Pixar Animation Studios. Pixar uses RenderMan to render their in-house 3D animated movie productions and it is also available as ...
, have recently added new type in recent years called RSL plugin shadeop. This type uses a newer
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significa ...
API but otherwise can't be distinguished from the older type by a user, when called from within a shader.
Example
The following example shader makes use of the ''ambient()'', ''diffuse()'', ''faceforward()'', ''normalize()'' and ''transform()'' built-in shadeops as well as the ''checkerboard()'' user-defined RSL plugin shadeop.
plugin "checkerboard";
surface
checkmatte(float Ka = 1, Kd = 1;)
{
normal Nf = faceforward(normalize(N), I);
color pattern = checkerboard(transform("object", P));
Oi = Os;
Ci = Oi * Cs * pattern * (Ka * ambient() + Kd * diffuse(Nf));
}
Shading