Shading interpolation

Shading interpolation defines what happens to pixels for which shading is not computed when shading resolution (see above) is greater than 1 or kInfinity. SetShadingInterpolation takes a TAttribute3DState instance with its enumerated field EShadingInterpolationMode set to either kFlat or kColorSmooth. The shading interpolation defaults to kColorSmooth.

kFlat: The shading of the pixels between the shaded pixels is copied from the previous pixels. If shading resolution is 10, the first pixel is shaded, the next nine are copied from the first pixel, the tenth pixel is shaded, the next nine are copied from the tenth pixel, and so on.

kColorSmooth: The shading of the pixels between the shaded pixels is linearly interpolated (smoothed). If shading resolution is 10, the first and tenth pixels are shaded. Pixels 2 through 9 are smoothed according to the shading in pixels 1 and 10.

Figure 204 shows the TGrafBundle3D functions for shading interpolation.



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker