Configuration files

Every line in the configuration file either is a comment (a line the begins with a #), or a parameter declaration. Parameter declarations look like:
type name = value
The following table lists all of the defined types:

Type Description
color An array of 3 real numbers
float A real number
int An integer
string A string of characters (no quotes required)
vec An array of 3 real numbers

Predefined names

While you can declare any parameter that you want, we have pre-defined a few names that affect various aspects of the viewing of the object. Most of these parameters are automatically read into variables defined in shader.h.
string patchObject
The name of a Wavefront file containing an object in a patch representation.
int loDice
When displaying a patched object, how finely to dice the object when the mouse buttons are pressed (i.e. when you are interactively manipulating the object).
int hiDice
When displaying a patched object, how finely to dice the object when the mouse buttons are not pressed (i.e. when displaying a refined version of the object).
vec eyePosition
The eye position, given in world coordinates. Placed into the variable eyePosition.
float fieldOfView
The field of view of the projection transform.
float zNear
The distance to the near clipping plane.
float zFar
The distance to the far clipping plane.
int numLights
The number of lights in the environment. Placed into the variable numLights.
vec lightNPos
Sets the position of light number N. Placed into the position field of the LightInfo structure (defined in shader.h).
vec lightNDir
Sets the direction of light N.
vec lightNRight
Sets the "right" direction of light N. This can be useful in parameterizing a light source when placing a texture in front of the light source.
vec lightNUp
Sets the "up" direction of light N. This can be useful in parameterizing a light source when placing a texture in front of the light source.
color lightNColor
Sets the "color" of light N.
float lightNSpotAngle
Sets the "spot angle" of light N. This, along with the direction of the light, is useful in implementing spot lights.
float lightNuscale
Sets a horizontal scaling factor for light N. When used with a projected texture's width, this parameter is useful for adjusting the horizontal extent of the projected texture.
float lightNvscale
Sets a vertical scaling factor for light N. When used with a projected texture's height, this parameter is useful for adjusting the vertical extent of the projected texture.

Copyright © 1997--1998 Pat Hanrahan and Andrew C. Beers