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

## gDPSetColorDither [macro]

Sets the RGB color dither.

Syntax

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

Arguments

- gdl is the display list pointer

- type is the color dithering type:
  G_CD_MAGICSQ (Magic square ordered dither method)
  G_CD_BAYER ("Standard" Bayer matrix ordered dither method)
  G_CD_NOISE (Random noise dither)
  G_CD_DISABLE (No dithering)

Explanation
Sets the type of color dithering.

The RDP maintains each color component (RGB) value with 8-bit precision until processing in the memory interface (MI). With a 16-bit RGB frame buffer, the precision of each color is reduced to 5-bit precision, so dithering can also reduce Mach bands.

Ordered dithering has a "scattering" effect on the pixel neighborhood of the original image.

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

Cautions
The video interface (VI) has logic to gather or playback the original information of neighboring pixels while video is being displayed. This feature can be enabled/disabled by setting either OS_VI_DITHER_FILTER_ON or OS_VI_DITHER_FILTER_OFF in osViSetSpecialFeatures.

We recommend using G_CD_MAGICSQ as the color dithering type with OS_VI_DITHER_FILTER_ON, and G_CD_BAYER with OS_VI_DITHER_FILTER_OFF. However, you need to make adjustments for every application, scene and object.

See Also
gDPSetAlphaDither
osViSetSpecialFeatures

Revision History
2/1/99 Completely rewritten.

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-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999