gDPSetAlphaDither.3p
1.78 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
52
53
54
55
56
57
58
59
.TH gDPSetAlphaDither 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPSetAlphaDither, gsDPSetAlphaDither
\- enable or disable alpha dithering
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
gDPSetAlphaDither(Gfx *gdl, unsigned int type)
gsDPSetAlphaDither(unsigned int type)
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I type
choose type of alpha dithering, either
\f3G_AD_PATTERN\fP,
\f3G_AD_NOTPATTERN\fP,
\f3G_AD_NOISE\fP,
or
\f3G_AD_DISABLE\fP.
.SH DESCRIPTION
This command selects (or disables) various types of alpha dithering.
The RDP pipeline keeps alpha values in 8 bit precision until the Blender.
The blender processes alpha in only 5 bits of precision.
Therefore, dither may be necessary in order to remove Mach bands.
However, the alpha channel is typically used for transparency and the transparency coefficient Mach bands are much less noticible.
.PP
The various types of dither patterns all have their strengths and
weaknesses, depending on other rendering modes and content of the
scene.
Choosing a noise dither may give a special noisy effect while pattern dither typically yields better results when camara motion movement is slow.
.PP
.B G_AD_PATTERN,
alpha dither depends on setting of color dither.
If the color dither is disabled, the "standard" Bayer matrix order dither is used for alpha dithering.
If the color dither is noise dither, a magic square order dither is used for alpha dithering.
Note that even if you use a 32 bit framebuffer where color dithering is not necessary, alpha will always reduce from 8 to 5 bits in the blender.
.PP
.B G_AD_NOTPATTERN,
inverted pattern of what \f3G_AD_PATTERN\fP is.
.PP
.B G_AD_NOISE,
random noise dither.
.PP
.B G_AD_DISABLE,
no dithering.
.PP
.SH SEE ALSO
.IR gDPSetAlphaCompare (3P)
.IR gDPSetColorDither (3P)