Contours

The use of flexible, user-defined contour shaders opens up the possibility of many new effects. User-specified functions and shaders determine where the contours should be and compute contour colors and widths. These computations can be based on any information about the geometry, illumination, and materials of the scene, for example Z depth, Z depth difference, orientation, curvature, light source directions, material color, fog, etc.

The list of possible contour shaders is endless. A few ideas for contour shaders are: different styles of contour lines such as hand-drawn pencil, chalk, calligraphic pen, brush, wiggly lines, dashed lines, etc; contours between areas in shadow and areas not in shadow; contour parameters depending on motion information; highlights on contours to indicate curving edges.

The following is a detailed description of how contours are computed, and how the contour store shader, the contour contrast shader, and the contour shaders are called. Note that contour shaders do not follow the normal shader argument conventions. They do support initialization and exit shaders with standard init/exit shader prototypes and semantics. They are not called during final gathering preprocessing and light mapping.

Copyright © 1986-2010 by mental images GmbH