home *** CD-ROM | disk | FTP | other *** search
-
- m DITHER-DEMO 4:
-
- Dithering is a technique used to fool the human eye into seeing
- more colors than are actually being displayed. Dithering works by placing
- different colors so close together that the eye 'mixes' them and perceives
- a third color. The dither demo program opens a high resolution interlaced
- screen that uses two bit-plans: it is limited to display 4 colors, just
- like a standard WorkBench screen. Three of these four colors ('white' the
- background color is not used) are mixed to yield 9 different 'perceived'
- colors. By using a trick of the Amiga hardware we are able to change
- the color palette many times during a display field, which lets us use
- a different set of 4 colors on EVERY horizontal line. The demo program
- only changes the color palette once every 8 lines, giving us 9 colors
- per row by 80 rows, or over 600 colors!
-
- Graphics programming using dithering is not nearly as complex
- as programming using the Amiga's 'Hold and Modify' (or HAM) mode, so it
- provides an economical way to increase the number of displayable colors
- without using a lot of memory and caffeine. You'll notice that the demo
- program is less than 5000 bytes long: it was written in 'C' and could
- easily be reduced further in assembly language.
-
- This demo program is Copyright © 1989 by Lake Forest Logic Inc.,
- publisher of The Disk Mechanic utility package for the Amiga.
- Permission is hereby granted to freely re-distribute the program provided
- this document file accompanies it and neither file is modified.
-
- 3/10/89 Erik C. Quackenbush
-
- Call the Lake Forest Logic BBS at (312)680-0590.
- All Amiga, 24 hours, 2400 baud, 20 mb on-line storage.
- PC-PURSUITABLE!
-