FUNCTIONS



INTENSITY

Click box to see full description


This is function takes a color C and returns the intensity.
Intensity is calculated by averaging the components of the color.
The return value is a float = (RED + GREEN + BLUE)/3.

LUMINENCE

Click box to see full description


This is function takes a color C and returns the luminence value.

AMBIENT

Click box to see full description


This function returns a color.  OUT = Ka * AMB.
The color is the co-efficient Ka multiplied by the surface color AMB. 

DIFFUSE

Click box to see full description


This function returns a color.
The color is the sum of the diffuse reflection for all the light sources
multiplied by the co-efficient Kd and the surface color DIF.

HIGHLIGHT

Click box to see full description


This function returns a color.
The color is the sum of the specular reflection for all the light sources
multiplied by the co-efficient Ks and the highlight color HI.

PHONG_SPECULAR

Click box to see full description


This function returns the phong factor based on the direction
of illumination vector, DIR, the specular exponent, EXP, and 
the normal and dir state variables.

MI_FRESNEL

Click box to see full description


This function returns the fresnel factor.

MI_FRESNEL_REFLECTION

Click box to see full description


This function returns the fresnel reflection based on the
interior and exterior indices of refraction and on the dir,
normal and normal_geom state variables.

MI_FRESNEL_SPECULAR

Click box to see full description


This function returns the fresnel specular factor based on the 
direction of illumination dir, the specular exponent exp, the
interior and exterior indicies of refraction and the normal
and dir state variables.

BASICCOLORLOOKUP

Click box to see full description


This function returns a color from a color texture image or shader.

COLORTEXLOOKUP

Click box to see full description


This function returns a color from a color texture image or shader.

SCALARTEXLOOKUP

Click box to see full description


This function returns a scalar from a scalar texture image or shader.

VECTORTEXLOOKUP

Click box to see full description


This function returns a vector from a vector texture image or shader.

TRACE_ENVIRONMENT

Click box to see full description


This function returns a color.
It casts an environment ray from point state->point in direction dir.

TRACE_EYE

Click box to see full description


This function returns a color.
It casts an eye ray from point org in direction dir.

TRACE_REFLECTION

Click box to see full description


This function returns a color.
It casts a reflection ray from point state->point in direction dir.

TRACE_REFRACTION

Click box to see full description


This function returns a color.
It casts a refraction ray from point state->point in direction DIR.

TRACE_SHADOW

Click box to see full description


This function returns a color.
It casts a shadow ray and returns the color modified by shadow
shaders.

TRACE_TRANSPARENCY

Click box to see full description


This function returns a color.
It casts a transparency ray from point state->point in 
direction state->dir.

GET_COLOR

Click box to see full description


This returns the color in the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

GET_DEPTH

Click box to see full description


This returns the depth of the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

GET_LABEL

Click box to see full description


This returns the label in the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

GET_NORMAL

Click box to see full description


This returns the normal in the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

GET_SCALAR

Click box to see full description


This returns the scalar in the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

GET_VECTOR

Click box to see full description


This returns the vector in the MAP file at the location (X,Y).
MAP is the filename of the map file.
X   is the x coordinate of the location into the map.
Y   is the y coordinate of the location into the map.

PUT_COLOR

Click box to see full description


This function stores the color C in the color image file MAP 
at the location X,Y and then returns that color.

PUT_DEPTH

Click box to see full description


This function stores the depth D in the depth image file MAP 
at the location X,Y and then returns that depth.

PUT_LABEL

Click box to see full description


This function stores the label L in the label image file MAP 
at coordinate X,Y and then returns that label.

PUT_NORMAL

Click box to see full description


This function stores the normal N in the normal image file MAP 
at location X, Y and then returns that normal.

PUT_SCALAR

Click box to see full description


This function stores the scalar S in the scalar image file MAP 
at coordinate X,Y and then returns that scalar.

PUT_VECTOR

Click box to see full description


This function stores the vector V in the vector image file MAP 
at the location X, Y and then returns that vector.

LIGHT_INFO

Click box to see full description


This function returns information for a light.

TEXTURE_INFO

Click box to see full description


This function returns information for a texture.

TRI_VECTORS

Click box to see full description


All the information in the state pertains to the interpolated
intersection point in a triangle.  This function returns the 
uninterpolated triangle vertices.

FATAL

Click box to see full description


This function is used to print out a fatal message.

ERROR

Click box to see full description


This function is used to print out an error message.

WARNING

Click box to see full description


This function is used to print out a warning message.

INFO

Click box to see full description


This function is used to print out an info message.

PROGRESS

Click box to see full description


This function is used to print out a progress message.

DEBUG

Click box to see full description


This function is used to print out a debug message.

VDEBUG

Click box to see full description


This function is used to print out a vdebug message.

PRINTF

Click box to see full description


This function is used to print the value of variables.
The input can be most any data type. 
Insert this box into data streams to see what the values are.
Use the COND input to control the printing.

PRINTFLABEL

Click box to see full description


Prints the value of variables with your own label text. Input can be 
most any data type, and the label any text string. Insert this box into 
data streams to display the values are. Use COND to control printing.

PRINTFONCE

Click box to see full description


This function is used to print the value of a variable ONCE, then exits.
The input can be most any data type. 
Insert this box into data streams to see what the values are.
Use the COND input to control the printing - exits once.

COLORCHECK

Click box to see full description


Use to check for colors outside the range 0.0 - 1.0. 
Normally IN is passed to both EOUT and COUT, unless IN falls outside 0.0 - 1.0,
in which case EOUT passes the Error Color (ERR), and COUT passes IN clamped 0.0 to 1.0.

FOREXAMPLE

Click box to see full description


This function generates a fractal variable.
PP  is the point used to seed the noise function.
FQ  is the frequency for the noise.
NUM is the number of iterations through the loop.
INC is the increment for the loop counter.
SCL is multiplied by the noise function on each iteration.
DIV is the divisor for SCL on each iteration.

EXIT

Click box to see full description


This exits the shader, with the return code specified.

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