Shadeop
Encyclopedia
Shadeop is a term used in computer graphics rendering
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 to refer to an atomic, built-in function
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 used in a shader
Shader
In the field of computer graphics, a shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility...

.

It is a portmanteau that blends the terms shading
Shading
Shading refers to depicting depth perception in 3D models or illustrations by varying levels of darkness.-Drawing:Shading is a process used in drawing for depicting levels of darkness on paper by applying media more densely or with a darker shade for darker areas, and less densely or with a lighter...

and operation.

Meaning in the RenderMan context

The term is specifically used in the context of shaders written in the RenderMan Shading Language
RenderMan Shading Language
Renderman Shading Language is a component of the RenderMan Interface Specification, and is used to define shaders. The language syntax is C-like....

 (RSL) for use with RenderMan-compliant
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...

 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
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 to be loaded and treated like built-in shadeops. These are commonly referred to as DSO shadeops. Two RenderMan implementations, 3Delight
3Delight
3Delight is a proprietary, photorealistic, RenderMan-compliant offline renderer.It is developed by DNA Research, or DNA in short, a subsidiary of Taarna Studios.-Features:...

 and PhotoRealistic RenderMan
PhotoRealistic RenderMan
PhotoRealistic RenderMan, or PRMan for short, is a proprietary photorealistic RenderMan-compliant renderer.It primarily uses the Reyes algorithm but is also fully capable of doing ray tracing and global illumination....

, have recently added a new type called RSL plugin shadeop. This type uses a newer C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

  API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

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));
}
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK