gDPSetKeyR.3p 1.17 KB
.TH gDPSetCombineKey 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPSetKeyR, gsDPSetKeyR, gDPSetKeyGB, gsDPSetKeyGB,
\- Select color for chroma key operation.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"

gDPSetKeyR(Gfx *gdl, cR, sR, wR)

gsDPSetKeyR(cR, sR, wR)

gDPSetKeyGB(Gfx *gdl, cG, sG, wG, cB, sB, wB)

gsDPSetKeyGB(cG, sG, wG, cB, sB, wB)

\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I color center
Defines the intensity at which key is active, 0-255.
.TP
.I color scale
(1.0/(size of soft edge))*255. scale is in the range 0-255.
For hard edge keying, set scale to 255.
.TP
.I color width
(Size of half the key window including the soft edge)*scale. width
is expressed in a 12-bit 4.8 format. If 
width > 1.0, keying is disabled for that channel.
.SH DESCRIPTION
Select color for chroma key operation.

Conceptually, the equation used for keying is:

\f3
key = clamp(0.0, -abs((X - center) * scale) + width, 1.0)
\fP

The alpha key is the minimum of KeyR, KeyG, or KeyB.

.SH NOTE
The red, green, and blue chroma key information is split into two
separate commands simply because they do not all fit in one command.
.SH SEE ALSO
.IR gDPSetCombineKey (3P)