SURF

THE BOX'S MAIN HELP:
Access the value of parameter PARM in the surface 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 surface shader will do with that parameter.
The datatype of the output OUT must be the same as that of PARM
in the surface shader.  If PARM is not found, then the output
is set to the default value DVAL.
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 surface shader.  This box can also be used to peek at
a value that the surface shader has calculated by making the
parameter an output parameter using the keyword "output" on it in 
the surface shader.  The surface 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 surface
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 surface shader to get.

DVAL (input):
Default value to use if the parameter is not found in the 
surface shader.
May be any data type.

OUT (output):
Resulting value is either the value of PARM in the surface shader
if PARM is found and matches the datatype of OUT, otherwise set to
the default value DVAL.

<-- BACK TO Functions

© Copyright 1996,1998 Cinema Graphics Inc. All Rights reserved.