Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dither(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



dither(3G)                                                          dither(3G)



NAME
     dither - controls the dithering of pixels

C SPECIFICATION
     void dither(mode)
     long mode;

PARAMETERS
     mode   expects one of two values:

            DTOFF disables dithering.

            DTON enables dithering (default).


DESCRIPTION
     Dithering is a pixel operation that attempts to convey as accurately as
     possible the color of an image when the framebuffer stores fewer bits of
     color than are being computed or iterated.  This is done by creating a
     pattern of carefully chosen colors that, when viewed from a distance of a
     few feet or more, give the illusion of an accurately shaded image.  For
     example, if only 4, 8, or 12 bitplanes are available in the framebuffer,
     and color is being iterated with 24 bits (8 bits for each of red, green,
     and blue), dithering can be used to modulate the drawn colors to better
     approximate the 24 bit image.

     Dithering works in both RGB and color index modes.  In RGB mode,
     dithering is performed independently for red, green, blue, and alpha.
     When blending is enabled, blending occurs before dithering and uses the
     full precision of the iterated colors.  Dithering works on all drawing
     primitives:  points, lines, text, polygons, and pixel writes and copies.
     However, dithering has no effect if the framebuffer stores all the
     computed bits of color.  For example, pixel copies from framebuffer to
     framebuffer are not dithered.

     Dithering is enabled by default.  When drawing pre-dithered images, or
     when drawing single-width RGB lines on a 4 or 8-bit framebuffer, it may
     be best to turn dithering off.

SEE ALSO
     color, colorf, getgdesc

NOTES
     Some IRIS-4D models do not support dithering. Use getgdesc(GDDITHER) to
     determine whether dithering is supported.  Some machines support
     dithering only in RGB mode.  If getgdesc(GDCIFRACT) is FALSE then
     dithering is not supported in colorindex mode.

     On all RealityEngine models, there is hardware support for video
     dithering enabled by default.  This feature differs from render dithering
     because it only affects the pixels on the way out to the video.  On
     RealityEngine this dithering takes the 12-bit components and dithers them



                                                                        Page 1





dither(3G)                                                          dither(3G)



     to 10 bits before they are sent to the gamma lookup (which then outputs 8
     bits per component).  On releases prior to Irix 5.3, this feature was
     enabled through this call.  Video dithering is no longer affected by this
     call by default.  To re-enable this call you'll need to setenv
     REENABLEDITHERCMD.

     On all Personal Iris models, dithering can be enabled only when drawing
     in one of the following modes: shademodel(GOURAUD) or depthcue(TRUE).















































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026