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

Format
#include "gbi.h"

gDPSetColorDither(Gfx *gdl,
   unsigned int type)
gsDPSetColorDither(unsigned int type)
Arguments
  • gdl is the pointer to the graphics display list
  • type is the type of color dithering (G_CD_MAGICSQ, G_CD_BAYER, G_CD_NOISE, G_CD_ENABLE, or G_CD_DISABLE)
What This Macro Does
It sets (or disables) various types of color dithering. The RDP pipeline keeps individual color component values in 8-bit precision until the Memory Interface. The framebuffer can only accept color components in 5-bit precision when using 16-bits-per-pixel framebuffer format. Therefore, dithering may be necessary to remove Mach bands.

Ordered dither has the effect of scattering the original complete information into a pixel neighborhood region. The video interface (VI) contains logic to gather or recover the original information within the pixel neighborhood during video display. This feature can be enabled or disabled by calling osViSetSpecialFeatures with either OS_VI_DITHER_FILTER_ON or OS_VI_DITHER_FILTER_OFF, respectively. This yields the best results in removing Mach bands in the low color resolution format (5/5/5 RGB).

Your dither choices for this macro are:
  • G_CD_MAGICSQ is an ordered pattern dither. It is the best choice if the video dither filtering is enabled.
  • G_CD_BAYER is an ordered pattern dither - the standard Bayer matrix. It is the best choice if the video dither filtering is disabled.
  • G_CD_NOISE is a random noise dither.
  • G_CD_DISABLE is no dithering.
  • G_CD_ENABLE is enable random noise dither. This is for Hardware 1
  • compatibility only. For Hardware 2, please use G_CD_MAGICSQ, G_CD_BAYER,
  • G_CD_NOISE, or G_CD_DISABLE.
See Also
gDPSetAlphaDither
osViSetSpecialFeatures



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