home << prev next >> contents  


Contour Contrast Shaders

There are two built-in contour contrast shaders. Contour contrast shaders specify where there should be a contour by comparing the information stored by the contour store shader during sampling. The two contour contrast shaders are designed to be paired with the standard and simple contour store shaders described above, respectively.

contour_contrast_function_levels

    "contour_contrast_function_levels" (
        scalar          "zdelta",
        scalar          "ndelta",
        boolean         "diff_mat",
        boolean         "diff_label",
        boolean         "diff_index",
        boolean         "contrast",
        integer         "min_level",
        integer         "max_level"
    )

The following parameters are available:

zdelta is the minimum depth difference required to cause a contour, measured in coordinate units.

ndelta is the minimum angle difference between normal vectors required to cause a contour, measured in degrees.

diff_mat, if set to on, causes a contour between different materials.

diff_label, if set to on, causes a contour between different object labels. It can be used to outline objects.

diff_index, if set to on, causes a contour between different triangles. It can be used to draw triangle wireframes.

contrast, if set to on, causes a contour between colors that exceed the contrast threshold specified in the options block. In the case of semitransparent object, contrasts caused by other objects behind the semitransparent object are taken into account.

min_level and max_level limit contours to ray generations of at least min_level and at most max_level. Every reflection and refraction counts as one level. For example, to exclude contours around reflections and refractions, set max_level to 0.

contour_contrast_function_levels_simple

This shader can be used for very fast contour computations along with contour_store_function_simple if only the outlines of objects need to have contours (and if they should only have simple contours). This shader has no parameters.

    "contour_contrast_function_simple" ()
home << prev next >> contents  


Copyright (©) 1986-2006 by mental images GmbH