home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / contrib / cgx3dvirge / cgx3dvirgin2_6dev.lha / manpages / ViRGE-3Dman-4.iff (.png) < prev    next >
IFF Interleaved Bitmap Image  |  1998-01-25  |  24KB  |  664x841  |  1-bit (2 colors)
Labels: text | font | screenshot | black and white | number | paper | document
OCR: VIRGE Integrated 3D Accelerator 83 Incorporated 15.4.7 MUX Buffering Z-buffering requires 16 bits of video memory storage for each displayable pixel. If insufficient memory is available, MUX buffering may allow z-buffering to be performed. With MUX buffering, the active frame buffer area (draw buffer) is alternately programmed with z-buffer values and pixel colors. This requires that all the primitives (lines and triangles) of the scene be rondered twice, which decreases performance. Otherwise, MUX buffering produces the effects as normal z-buffering. MUX buffering can only be used when the destination format is 16 bits/pixel and no alpha blending is to be performed |bit 19 of the Command Set register = 0). When the destination format is 16 bits/pixel, bit 15 = 1 indicates the word contains a z value and bit 15 = + indicates the word contains an RGB555 value. With MUX buffering, double buffering should be used so that the z-buffering can be done in the inactive [back) buffer. See the Streams Processor section for an explanation of double buffering. Z-buffering is enabled as explained in the previous section except that bit 23 of the Command Set register must be set to 1 so that the source pixel z valuo will replace the current z-buffer value. As a final setup step, the entire buffer must be written with either a solid color or a prerendered bitmap. This sets the z bit of each word to 0, Indicating that colors are stored. On the first pass, bits 25-24 of the Command Set register are programmed to 01b to specify the z-buffer pass. The Sad Engine interpolates only the z values of the the source primitive tline ar triangle). For each source pixel, if the corresponding destination pixel is a color tbit 15 = 0}, the source 2 value replaces the destination color. For the first primitive to be drawn for the scene, the source pixels (z values) will replace all the corresponding destination pixels (colors) because of the initialization to colors. For subsequent primitives for the scene, the source pixel may or may not replace the destination pixel. It will always replace it if the destination is a color, but if the destination is a z-value, it will only replace it if the z comparison passes. At the end of this pass, all pixels corresponding to primitives are set to z values. All other pixels retain the Initialization color values. For the second pass, hits 25-24 of the Command Set register are programmed to 10b to specify the draw buffer pass. The S3d Engine again interpolates the z values for all source primitives. If the destination pixel is a color, that pixel color is left unchanged. If the destination pixel is a z value, the source 2 value is compared with the destination z value. If they are equal, the source color is computed and that color value replaces the destination / value. At the end of this pass, all pixels in the buffer contain color values. The buffer is then switched to the front (active) and is used for the next screen refresh. 15.4.8 3D Pixel Color Generation Pixel color generation for 3D drawing occurs in a series of steps as depicted in Figure 15.7. The first of these, calculate the source pixel color, has been explained in the 3D line and triangle drawing sections above. The remaining steps ard: 7. Filter . If texturing is enabled for a 3D triangle, two, four or cight texels Itexture pixel) from the texture map can be filtered {interpolated) to generate a texture color to be mixed with the source color in step 3 or a code to be used in the next step. 2. Generate - For certain applications, textures can be stored in a compact colorless mode (Bland4). This step generates a texture color based on the compact coding, which may or may not be the output of filtering from the previous step. This color is used in the next step. 15 26 ENHANCED PROGRAMMING