Browse Prior Art Database

Alpha Blending Without Alpha Planes Or Raster Multiply

IP.com Disclosure Number: IPCOM000121095D
Original Publication Date: 1991-Jul-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 4 page(s) / 148K

Publishing Venue

IBM

Related People

Brase, DD: AUTHOR [+3]

Abstract

High-end graphics adapters often provide a type of per-pixel blending known as alpha blending. Traditional hardware solutions use up to 8 bits per pixel of memory to hold the alpha blending coefficient and require integer multiplication capabilities in the rasterizer. This article describes an implementation which emulates full alpha blending without requiring dedicated alpha planes and without requiring a rasterizer capable of multiplication. Instead, the second frame buffer in a 24-bit double buffered system is used as a working buffer and the adapter CPU processors are used to perform the multiplications.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 37% of the total text.

Alpha Blending Without Alpha Planes Or Raster Multiply

      High-end graphics adapters often provide a type of
per-pixel blending known as alpha blending.  Traditional hardware
solutions use up to 8 bits per pixel of memory to hold the alpha
blending coefficient and require integer multiplication capabilities
in the rasterizer.  This article describes an implementation which
emulates full alpha blending without requiring dedicated alpha planes
and without requiring a rasterizer capable of multiplication.
Instead, the second frame buffer in a 24-bit double buffered system
is used as a working buffer and the adapter CPU processors are used
to perform the multiplications.

      For every pixel there are 9-pieces of data available for
generating the resultant pixel values:
                A) Four new pixel values (SOURCE):
                     1. red   source (Rs)
                     2. green source (Gs)
                     3. blue  source (Bs)
                     4. alpha source (As)
                B) Four "accumulated" pixel values (DESTINATION):
                     1. red   destination (Rd)
                     2. green destination (Gd)
                     3. blue  destination (Bd)
                     4. alpha destination (Ad)
                C) One control mask (Cm)

      To calculate the final destination pixel values requires the
following "post-rendering" calculations per pixel for each pixel to
be updated as determined by the control mask Cm:
                     Rd' = (Rs * Fs) + (Rd * Fd)
                     Gd' = (Gs * Fs) + (Gd * Fd)
                     Bd' = (Bs * Fs) + (Bd * Fd)
                     Ad' = (As * Fs) + (Ad * Fd)
           where Fs is one of:          and Fd is one of:
             0                            0
             1                            1
             DESTIN_RGB                   SOURCE_RGB
             1-DESTIN_RGB                 1-SOURCE_RGB
             SOURCE_ALPHA                 SOURCE_ALPHA
             1-SOURCE_ALPHA               1-SOURCE_ALPHA
             DESTIN_ALPHA                 DESTIN_ALPHA
             1-DESTIN_ALPHA               1-DESTIN_ALPHA

      Alpha blending is performed on a triangle by triangle basis, or
in any unit which can guarantee that the pixels do not overlap. The
alpha blending can be performed in either two or four passes of the
rasterizer, depending on the amount of available processor me...