RSL
|
Thanks for the Memory
When a shader is used by the renderer it has access not only to itw own
data, which is loaded into its own private memory, but also to shared
data that is maintained by the renderer.
|
Instance Variables
Shaders have access to data stored in instance variables. An
example of an instance variable is displacement test(float Km = 0.1)
Data given to the shader from the RIB file is shown within the parentheses.
The word float denotes a data type. The
float data type indicates a single numeric value will be stored in memory. |
Local VariablesShaders can also access data stored in local variables. { float hump = 0; point n; }
A shader must declare the memory containers it will use to store the
results of any calculations it performs. |
© 2002- Malcolm Kesson. All rights reserved.