Shadeop


title: "Shadeop" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["shading"] topic_path: "general/shading" source: "https://en.wikipedia.org/wiki/Shadeop" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

A shadeop (shading operation) in computer graphics rendering is an atomic, built-in function used in a shader.

Meaning in the RenderMan context

The term is specifically used in the context of shaders written in the RenderMan Shading Language (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 and PhotoRealistic RenderMan, have recently added a new type called RSL plugin shadeop. This type uses a newer C++ 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. ::code[lang=c] 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));

} ::

References

References

  1. "Class 4: GI shaders; shadeops".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

shading