afunct(3G)
afunct - specify alpha test function
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME afunct - specify alpha test function FORTRAN SPECIFICATION subroutine afunct(ref, func) integer*4 ref, func PARAMETERS ref expects a reference value with which to compare source alpha at each pixel. This value should be in the range 0 through 255. func is a symbolic constant taken from the list below. It identifies the alpha comparison function: AFNEVE, AFLESS, AFEQUA, AFLEQU, AFGREA, AFNOTE, AFGEQU, and AFALWA. AFALWA is the default. DESCRIPTION afunct makes the drawing of pixels conditional on the relationship of the incoming alpha value with a reference constant value. It is typically used to avoid updating either the color or the z bitplanes of a framebuffer pixel when the incoming pixel is completely transparent. Arguments ref and func specify the conditions under which the pixel will be drawn. The incoming (source) alpha value is compared against ref with function func. This comparison function is specified with the symbolic constants: AFNEVE Never pass. AFNEVE Pass if alpha is less than ref. AFNEVE Pass if alpha is equal to ref. AFNEVE Pass if alpha is less than or equal to ref. AFNEVE Pass if alpha is greater than ref. AFNEVE Pass if alpha is greater than or equal to ref. AFNEVE Pass if alpha is not equal to ref. AFNEVE Always pass. If the comparison passes, the incoming pixel is drawn (conditional on subsequent other tests like z-buffer). afunct can be called with arguments 0,AFNOTE to defeat drawing of completely transparent pixels. This assumes that incoming alpha is proportional to pixel coverage, as it is when either points or linesm is being used. afunct testing follows scan conversion and texture mapping but precedes all other pixel tests. Thus, if the test fails, color, zbuffer and stencil contents will not be modified. afunct operates on all pixel writes, including those resulting from the scan conversion of points, lines, and polygons, and from pixel write and copy operations. afunct does not affect screen clear operation, however. SEE ALSO blendf NOTES IRIS-4D G, GT, and GTX models, and the Personal Iris, do not support afunct. Use getgde to determine what support is available for afunct. BUGS On IRIS-4D VGX, XS, XS24, XZ, Elan and Extreme models, afunct cannot be enabled while stenci is being used. Also on these models, only AFNOTE with ref equal to 0 and AFALWA are supported.