Depth Cue Table


Related topics include:

For an overview and a list of lookup tables, see Lookup Tables.

Use depth cueing lookup tables to blend color computed by the lighting, shading, and texturing stages of the rendering pipeline with a depth cue color. The blending is controlled relative to the depth in NPC space. Use depth cueing, for example, to blend the portion of the image furthest away from the viewer with the background color, heightening the sensation of depth in the image. Color alpha components are not depth cued.

------------------------------------------------------------------------------------------------
Table Value                                       Description            Fallback            PEX
Mask
------------------------------------------------------------------------------------------------
PEXLUTVDepthCueMode                                                                          5.0
                                                  depth cue mode         PEXOff
PEXLUTVDepthCueFrontReferencePlane                                                           5.0
                                                  front reference plane  1.0
PEXLUTVDepthCueBackReferencePlane                                                            5.0
                                                  back reference plane   0.0
PEXLUTVDepthCueFrontScaleFactor                                                              5.0
                                                  front scale factor     1.0
PEXLUTVDepthCueBackScaleFactor                                                               5.0
                                                  back scale factor      0.0
PEXLUTVDepthCueColor                                                                         5.0
                                                  depth cue color        (PEXColorTypeRGB,
                                                                         (0.0, 0.0, 0.0))
PEXLUTVDepthCueAll (selects entire table entry)                                              5.0
------------------------------------------------------------------------------------------------

PEXlib defines the following values:

depth cue mode:

PEXOff -
does not perform depth-cueing.

PEXOn -
performs depth-cueing.

depth cue color:
Primitives are depth cued by blending the reflected and textured color of their points with the specified depth cue color.

reference planes:
The front and back reference planes are perpendicular to the NPC z axis, and are specified by the ZNPC coordinate at which they intersect that axis.

scale factors:
The scale factors must be in the range [0.0, 1.0].

The depth cueing table is always accessed when rendering. The value of the pipeline state's depth cueing index selects the desired entry of the table.

Direct color components that are out of range are treated in an implementation-dependent way. If you specify an unsupported color type, then the implementation issues a BadPEXColorType error. If the color type is PEXColorTypeIndexed and the color index is 65535, then the implementation issues a BadValue error. If you specify an undefined depth cue mode, if the back reference plane is greater than the front reference plane, or if the front scale factor or back scale factor is not in the range [0.0, 1.0], then the implementation issues a BadValue error.

Valid depth cue table indices are in the range [0, 65534]. The fallback entry is entry 0.