home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 231.lha / Dither3.doc < prev    next >
Text File  |  1989-04-09  |  2KB  |  32 lines

  1.  
  2. m            DITHER-DEMO 3:
  3.  
  4.     Dithering is a technique used to fool the human eye into seeing
  5. more colors than are actually being displayed. Dithering works by placing
  6. different colors so close together that the eye 'mixes' them and perceives
  7. a third color. The dither demo program opens a high resolution interlaced
  8. screen that uses two bit-plans: it is limited to display 4 colors, just
  9. like a standard WorkBench screen. Three of these four colors ('white' the
  10. background color is not used) are mixed to yield 9 different 'perceived'
  11. colors. By using a trick of the Amiga hardware we are able to change
  12. the color palette many times during a display field, which lets us use
  13. a different set of 4 colors on EVERY horizontal line. The demo program
  14. only changes the color palette once every 8 lines, giving us 9 colors
  15. per row by 40 columns, or 360 colors! 
  16.  
  17.     Graphics programming using dithering is not nearly as complex
  18. as programming using the Amiga's 'Hold and Modify' (or HAM) mode, so it
  19. provides an economical way to increase the number of displayable colors
  20. without using a lot of memory and caffeine. You notice that the demo 
  21. program is less than 3000 bytes long: it was written in 'C' and could 
  22. easily be reduced further in assembly language.
  23.  
  24.     This demo program is Copyright © 1989 by Lake Forest Logic Inc.,
  25. publisher of The Disk Mechanic utility package for the Amiga.
  26. Permission is hereby granted to freely re-distribute the program provided
  27. this document file accompanies it and neither file is modified. 
  28.  
  29.  
  30.                         3/10/89
  31.                         Erik C. Quackenbush
  32.