gDPSetKeyR.3p
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.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)