Content deleted Content added
Line 18:
Shaders do the work by reading and writing special variables like Cs - surface color, N - normal at given point, and Ci - final surface color.
The arguments to the shaders are global parameters that are attached to objects of the model (so one metal shader can be used for different metals and so on),
and they have no return values. On the other hand functions operate by taking arguments and returning a value, and make little use of special variables. For example the following function computes vector length looks almost like a [[Java (programming language)|Java]] or [[C (programming language)|C]] function except for using [[dot product]] operator:
float length(vector v) {
return sqrt(v . v); /* . is a [[dot product]] */
}
[[Category:3D graphics software]]▼
[[Category:3D computer graphics]]▼
[[Category:Pixar]]▼
==Further reading==
Line 34 ⟶ 29:
*[[Saty Raghavachary]]: ''Rendering for Beginners: Image synthesis using RenderMan'', Focal Press, ISBN 0-240-51935-3
*[[Rudy Cortes and Saty Raghavachary]]: ''The RenderMan Shading Language Guide'', Course Technology PTR, 1 edition (March 28, 2007), ISBN 1-598-63286-8
▲[[Category:3D graphics software]]
▲[[Category:3D computer graphics]]
▲[[Category:Pixar]]
{{graphics-software-stub}}
|