Alpha: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(cleanup...also example was bad because the combine forcefields use additive blending, not alpha channels)
mNo edit summary
Line 2: Line 2:
'''Alpha''' is an [[integer]] [[variable]] that is often included as the "fourth" number in a [[RGB]] color format. '''Alpha''' is an [[opacity]] rating from 0 - 255, where 0 is completely invisible and 255 is completely visible.  In a VMT file, the "$alpha" parameter is normalized from 0 to 1.0 instead.
'''Alpha''' is an [[integer]] [[variable]] that is often included as the "fourth" number in a [[RGB]] color format. '''Alpha''' is an [[opacity]] rating from 0 - 255, where 0 is completely invisible and 255 is completely visible.  In a VMT file, the "$alpha" parameter is normalized from 0 to 1.0 instead.


To store an individual alpha value in each pixel, an [[alpha channel]] is used as the fourth channel of the [[TGA]] file.  This allows variable opacity, for example, in a single texture, such as the lettered Petrol signs in Half-Life 2.  The texture's alpha channel can also be used to define self illumination instead of transparency.
To store an individual alpha value in each pixel, an [[alpha channel]] is used as the fourth channel of the [[TGA]] file.  This allows variable opacity, for example, in a single texture, such as the lettered Petrol signs in Half-Life 2.  The texture's alpha channel can also be used to define self illumination instead of opacity.

Revision as of 12:13, 15 July 2005

Alpha is an integer variable that is often included as the "fourth" number in a RGB color format. Alpha is an opacity rating from 0 - 255, where 0 is completely invisible and 255 is completely visible. In a VMT file, the "$alpha" parameter is normalized from 0 to 1.0 instead.

To store an individual alpha value in each pixel, an alpha channel is used as the fourth channel of the TGA file. This allows variable opacity, for example, in a single texture, such as the lettered Petrol signs in Half-Life 2. The texture's alpha channel can also be used to define self illumination instead of opacity.