Alpha testing

From DmWiki

Alpha testing is a simple means of making textures transparent. Alpha testing would be used when you want to make some parts of the texture completely opaque and others completely transparent, with nothing in between. Because of its performance advantages - as no frame buffer reads are required, as with blending - it can be benificial in fill rate-limited situations. For example, alpha testing was frequently used to make ladders and railings in Half-Life 1 and games of its era. However, as hardware performance has increased greatly since those days, alpha testing is now seldom used.

To use alpha testing, your texture must have an alpha channel (see alpha blending). When alpha testing is enabled, all points in the texture with alpha greater than some user-defined threshold are made transparent, and all points with alpha less than that value are made opaque. Direct3D also has the capability to do this without an alpha channel, by selecting a single color from the texture to be the "transparent color."

See also:


DevMaster navigation