LIGHT |
THE BOX'S MAIN HELP: Access the value of parameter PARM in the lightsource shader attached to the geometric primitive that is currently being shaded. This permits a shader to customize it's behavior based on it's knowledge of what the lightsource shader will do with that parameter. The datatype of the output OUT must be the same as that of PARM in the lightsource shader. If PARM is not found, then the output is set to the default value DVAL. This box is only valid within illuminance blocks. Parameters to a shader typically cannot be modified by the shader, therefore this box is useful to peek at the parameter value passed into the lightsource shader. This box can also be used to peek at a value that the lightsource shader has calculated by making the parameter an output parameter using the keyword "output" on it in the lightsource shader. The lightsource shader can write a value to an output parameter, thus making calculated results available to other shaders. Also, by making the parameter an output varying parameter using the keywords "output" and "varying", the lightsource shader can write different values for every sampled point. By default all parameters to a shader, including output parameters are uniform, not varying. The order in which shaders get executed will affect the value of an output parameter of a second shader before the second shader has had a chance to execute, then the value of the output parameter will not be the computed value. Shaders are executed in the following order: displacement, light, surface, atmosphere. parameters, (output): PARM (input): The name of the parameter in the lightsource shader to get. DVAL (input): Default value to use if the parameter is not found in the lightsource shader. May be any data type. OUT (output): Resulting value is either the value of PARM in the lightsource shader if PARM is found and matches the datatype of OUT, otherwise set to the default value DVAL. |
© Copyright 1996,1998 Cinema Graphics Inc. All Rights reserved.