N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

gDPSetAlphaDither

Format
#include "gbi.h"

gDPSetAlphaDither(Gfx *gdl,
   unsigned int type)
gsDPSetAlphaDither(unsigned int type)
Arguments
  • gdl is the pointer to the graphics display list
  • type is the type of alpha dithering (G_AD_PATTERN, G_AD_NOTPATTERN, G_AD_NOISE, or G_AD_DISABLE)
What This Macro Does
It sets (or disables) various types of alpha dithering. The RDP pipeline keeps alpha values in 8-bit precision until they enter the blender. The blender processes alpha in only 5 bits of precision. Therefore, dither may be necessary to remove Mach bands. However, the alpha channel is typically used for transparency and the transparency coefficient Mach bands are much less noticeable.

The various types of dither patterns all have their strengths and weaknesses, depending on other rendering modes and the content of the scene. Choosing a noise dither may give a special noisy effect while pattern dither typically yields better results when camera motion movement is slow. Following are the various types of dither you can use:
  • G_AD_PATTERN alpha dither depends on setting of color dither. If the color dither is disabled, the standard Bayer matrix order dither is used for alpha dithering. If the color dither is noise dither, a magic square order dither is used for alpha dithering. Note that even if you use a 32-bit framebuffer where color dithering is not necessary, alpha will always reduce from 8 to 5 bits in the blender.
  • G_AD_NOTPATTERN is an inverted pattern of what G_AD_PATTERN is.
  • G_AD_NOISE is a random noise dither.
  • G_AD_DISABLE is no dithering.
See Also
gDPSetAlphaCompare
gDPSetColorDither



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998