![]() This allows them to be moved about the display, covering the "background", with no effect on it.īlitting moves the same types of patterns about the screen, but does so by writing into the same memory as the rest of the display. Hardware sprites have the advantage of being stored in separate memory, and therefore don't disturb the main display memory. In this case, the mask would be ORed first, and the sprite ANDed next.īlitting is similar to hardware- sprite drawing, in that both systems reproduce a pattern, typically a square area, at different locations on the screen. It is also possible to achieve the same effect using a sprite with a white background and a white-on-black mask. Because any value ORed with 0 is unchanged, the background is unaffected and the black areas are filled with the actual sprite image. In the second blit, the sprite is blitted onto the newly altered background using the raster operator of OR. Because any value ANDed with 0 equals 0, and any value ANDed with 1 is unchanged, black areas are created where the actual sprites will appear, while leaving the rest of the background alone. In the first blit, the mask is blitted onto the background using the raster operator AND. The sprite must be 0 (black) anywhere where it is supposed to be transparent, but note that black can be used in the non-transparent regions. ![]() The mask pixels are 0 (black) wherever the corresponding sprite pixel is to be displayed, and 1 (white) wherever the background needs to be preserved. When preparing the sprite, the colors are very important. The sprite is drawn in various positions over the image to produce this: Instead a masked blit can be implemented with two regular BitBlit operations using the AND and OR raster operations. As the mask is 1-bit, there is no possibility for partial transparency via alpha blending.Ī loop that examines each bit in the mask and copies the pixel from the sprite only if the mask is set will be much slower than hardware that can apply exactly the same operation to every pixel. In this example a background image, a sprite, and a 1-bit mask are used. Machines that rely heavily on the performance of 2D graphics (such as video game consoles) often have special-purpose circuitry called a blitter.Įxample of a masked blit implementation Ī classic use for blitting is to render transparent sprites onto a background. The development of fast methods for various bit blit operations gave impetus to the evolution of computer displays from using character graphics ( text mode) to using raster graphics (bitmap) for everything. Dan Ingalls later implemented a redesigned version in microcode. Dan Ingalls, Larry Tesler, Bob Sproull, and Diana Merry programmed this operation at Xerox PARC in November 1975 for the Smalltalk-72 system. The name derives from the BitBLT routine for the Xerox Alto computer, standing for bit-boundary block transfer. ![]() Some software still uses XOR to draw interactive highlight rectangles or region borders when this is done to color images, the unusual resulting colors are easily seen. This is because bitwise operations on color displays do not usually produce results that resemble the physical combination of lights or inks. Modern graphics software has almost completely replaced bitwise operations with more general mathematical operations used for effects such as alpha compositing. The Commodore Amiga's graphics chipset (and others) could combine three source bitmaps using any of the 256 possible boolean functions with three inputs. Other ROPs may involve AND, OR, XOR, and NOT operations. The most obvious ROP overwrites the destination with the source. ![]() The ROP is essentially a boolean formula. The pixels of each are combined bitwise according to the specified raster operation (ROP) and the result is then written to the destination. The result may be written to a fourth bitmap, though often it replaces the destination. The operation involves at least two bitmaps: a "source" (or "foreground") and a "destination" (or "background"), and possibly a third that is often called the " mask". Please help improve this article by introducing citations to additional sources.īit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for bit block transfer) is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a boolean function. Relevant discussion may be found on the talk page. This article relies largely or entirely on a single source.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |