By default, Glide does not perform gamma correction (i.e. a linear ramp is used), however, gamma correction is available. A gamma value can be passed to the hardware using the Glide function grGammaCorrectionValue().
void grGammaCorrectionValue( float value )
grGammaCorrectionValue() sets the gamma correction value used during video refresh. Gamma is a positive floating point value from 0.0 to 20.0. Typical values are 1.3 to 2.2. The default value is 1.0 (i.e. a linear ramp is used).
The displayed RGB value (RGBgamma) is computed from the RGB value read from the frame buffer (RGBfb) according to the following equation:
RGBgamma = [(RGBfb/255)1/gamma]*255
Alpha values, like the red, green, and blue components of a color, are 8-bit values in the range [0..255]. Glide maintains a constant alpha value as part of the constant color described in the previous chapter that is set with grConstantColorValue(). Alpha values associated with vertices are set in the GrVertex structure, along with the geometric coordinates and other parameters.
Note: Control of high level rendering functions is managed by three functions, grAlphaCombine(), grColorCombine()(see ChapterChapter 5. ), andgrTexCombine()(described in Chapter Chapter 9. ). While the three routines will be presented individually, settings for one function can potentially affect the inputs to the other routines.
The alpha combine unit is similar to the color combine unit that produces RGB values for the pixel being rendered. A user-selectable combining function specifies a scale factor, and local and other alpha values, and a formula for combining them to produce a new alpha value. The alocal and aother inputs selected by the arguments to grAlphaCombine() can also be used in the scale factor chosen by grColorCombine(), described in the previous chapter.
void grAlphaCombine(GrCombineFunction_t func, GrCombineFactor_t factor,
GrCombineLocal_t local, GrCombineOther_t other,
FxBool invert