Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a222b6fddc3524ce

Jump to content

// Workers AI · dad joke modeWhat did Shadeop say to the tree? Leaf me alone.

From Wikipedia, the free encyclopedia

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

Meaning in the RenderMan context

[edit source]

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[when?] 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

[edit source]

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));
}

References

[edit source]
  1. "Class 4: GI shaders; shadeops". www.smartcg.com. Retrieved 2025-11-13.