wiki http://en.wikipedia.org/wiki/Shadeop Shadeop is a term used in computer graphics rendering to refer to an atomic, built-in function used in ashader. shadeop 的意思是 计算机图形渲染领域,其实就是renderman, shader 所使用的内建的函数 可以自己写shadeop(个人理解写完以后编译成dso或者dll 2009.10.10) 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. However, RSL 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. 用rsl写的函数只是被称为'funtions' shadeop大部分时间指内建的函数。 不过rsl允许使用C语言编写的编译过的plugin作为内建shadeop, 即DSO shadeops. 新的3delight 和prman最近支持C++ API的dso 下面的例子中, ambient(), diffuse(), faceforward(), normalize() and transform() 是内建的shadeop checkerboard()是用户自定义的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)); }