| |
Radeon® Alpha Blending
|
|
Fundamentally, alpha blending is an operation which allows a rendered pixel to be combined with data already in the frame buffer. This operation, may or may not involve "alpha" data at all. The general formula for alpha blending is as follows:
|
frameBuffer = src * srcFactor + dst * dstFactor
|
where src is the pixel being rendered and dst is the data already in the frame buffer. The variables srcFactor and dstFactor are programmable and can be set as shown in Table 1 below:
|
| Supported Factors |
| 0 |
| 1 |
| src.color |
| 1 - src.color |
| src.alpha |
| 1 - src.alpha |
| dst.alpha |
| 1 - dst.alpha |
| dst.color |
| 1 - dst.color |
| (f, f, f, 1) where f = min(src.alpha,
1 - dst.alpha) |
Figure 1 - Radeon® blend factors
This encompasses all of the alpha blend factors that can be programmed in Direct3D® and OpenGL®. As in the Rage family of accelerators, there is no dependence or mutual exclusivity between srcFact and dstFact. Naturally, Direct3D®'s D3DBLEND_BOTHSRCALPHA and D3DBLEND_BOTHINVSRCALPHA shorthands are also supported as srcFactor.
| |
|
| |