gDPSetAlphaDither [Macro]

Function

gDPSetAlphaDither

Sets alpha dithering

Syntax

#include <ultra64.h>        /* gbi.h */
gDPSetAlphaDither(Gfx *gdl, u32 type)
gsDPSetAlphaDither(         u32 type)

Argument

gdl
Display list pointer.
type
The alpha dithering type:
G_AD_PATTERN (No change in pattern)
G_AD_NOTPATTERN (The inverse of G_AD_PATTERN)
G_AD_NOISE (Random noise dither pattern)
G_AD_DISABLE (Disables alpha dithering)

Description

Sets the alpha dithering type. The RDP maintains the alpha value with 8-bit precision until processing in the blender (BL). The resolution of the alpha value output from the BL is reduced to 5-bit precision. For this reason, dithering is also used sometimes to reduce Mach bands.

All of the dithering types have their strong points and their weak points, depending on the rendering mode and the contents of the scene. For example, if camera motion is slow, then pattern dither generally produces good results. Special noise effects can be achieved with a noise dither.

For details, see Section 15.5.1 "Color Blend Hardware" in the N64 Programming Manual.

Note

The BL alpha value always drops from 8-bit precision to 5-bit precision, even when you use a 32-bit frame buffer which obviates the need for color dithering.

Comment

G_AD_PATTERN type alpha dithering depends on the color dithering settings (see gDPSetColorDither). If color dithering is disabled, then the "standard" Bayer matrix ordered dither method is used for alpha dithering. If color dither is set to noise dither, then the magic square ordered dither method is used for alpha dithering.

See Also

gDPSetAlphaCompare, gDPSetColorDither

Revision History

02/01/99   Completely rewritten