alpha_transparency(3G)
NAME
alpha_transparency, bf_alpha_transparency − specify alpha transparency attributes for front- and back-facing surfaces
SYNOPSIS
C Syntax:
void alpha_transparency ( fildes, mode, power, min, max );
int fildes, mode, power;
float min, max;
void bf_alpha_transparency ( fildes, mode, power, min, max );
int fildes, mode, power;
float min, max;
FORTRAN77 Syntax:
subroutine alpha_transparency ( fildes, mode, power, min, max )
integer*4 fildes, mode, power
real min, max
subroutine bf_alpha_transparency ( fildes, mode, power, min, max )
integer*4 fildes, mode, power
real min, max
Pascal Syntax:
procedure alpha_transparency ( fildes, mode, power:integer;
min, max:real )
procedure bf_alpha_transparency ( fildes, mode, power:integer;
min, max:real )
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened.
mode The blending mode for subsequent primitives.
0 - alpha blending disabled
1 - alpha blending enabled without attenuation
2 - alpha blending enabled with attenuation
power The power (1 to 16384) by which the cosine of the angle between the surface normal and the viewpoint vector is raised.
min The value (0.0 to 1.0) to be used if an alpha per vertex is not specified.
max The maximum opaqueness (0.0 to 1.0) that will be seen near the silhouette of a transparent surface (only used with mode=2).
Discussion
This procedure enables or disables alpha blending for front-facing and back-facing surfaces. The mode parameter also specifies whether the opaqueness of a surface should be modified as a function of the cosine of the angle between the viewpoint vector and the surface normal vector.
For mode=1, alpha is either the min value or, if specified, the alpha supplied with each vertex. For mode=2, alpha is calculated as:
alpha = max - (max-min)*(cosine(angle))^power
The resultant color is then calculated as:
resultant_color = alpha*source_color + (1-alpha)*destination_color
where source_color is the color of the new primitive and the destination_color is the existing raster color. Note: the order of rendering will determine which primitive, if any, contributes the destination color.
DEFAULTS
mode=0 (alpha transparency off)
SEE ALSO
Starbase Device Drivers Manual.
Hewlett-Packard Company — November 03, 1994