CS-184: Computer Graphics Today - Inst.eecs.berkeley.edu ...
CS-184: Computer Graphics Today - Inst.eecs.berkeley.edu ...
CS-184: Computer Graphics Today - Inst.eecs.berkeley.edu ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Alpha Channels<br />
Alpha channel<br />
stores opacity<br />
Primary operation<br />
is “over”<br />
Pre-multiplied alpha<br />
allows the use of<br />
the same rules for<br />
all 4 channels<br />
Normal Alpha Channel<br />
c = !c f + (1 − !)c b<br />
Pre-multiplied Alpha Channel<br />
c = c f + (1 − !)c b<br />
background RGB foreground RGB ! channel<br />
21<br />
21<br />
Alpha Channel<br />
Other Operations<br />
c = Fc f + Gc g<br />
22<br />
Operation<br />
Over<br />
Inside<br />
Outside<br />
Atop<br />
Xor<br />
Clear<br />
Set<br />
F<br />
1<br />
g<br />
G<br />
1"! f<br />
! 0<br />
1"! g<br />
0<br />
1"! f<br />
! g<br />
1"! g<br />
1"!<br />
f<br />
0 0<br />
1 0<br />
22