Scale and bias operations may be performed using the color matrix. A
scale factor can be applied using the glScale() command. A bias
is equivalent to a translation and may be applied using the
glTranslate() command. Using glScale() and
glTranslate(), the R scale or bias is put in the parameter, the
G scale or bias in the
parameter, and the B scale or bias in the
parameter. Modifications to the A channel must be specified using
glLoadMatrix() or glMultMatrix(). In general, using the
color matrix to implement scale and bias will be slower than using a
transfer operation which implements scale and bias directly, but
management of state may be easier using color matrices. Also, the
scale and bias could be rolled into another color matrix operation.