[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alpha blit question



>My question was more whether to support channeled alpha blits using
>the alpha component of each pixel or to use a separate alpha surface.

Whoops.  Misread your question...


>Probably the right answer is "both", but if I had to support one now,
>which would be most useful and likely to have the best longevity?

I would say you only need to support an alpha component per pixel.
I've never heard of anyone using a separate alpha plane.  I am sure
it is possible, but what are some uses of this?


>I thought that the alpha component had to be multiplied by both
>the source and destination pixels.  ??

Premultiplied alpha hust means that the RGB components of the pixels
have already been multiplied by the A component.  By rearranging the
alpha compositing operation, premultiplied surfaces save some 
'rendering-time' multiplies.  The blending operations available are 
somewhat limited. For an introduction to some of the issues of alpha 
and alpha blending, check out:

ftp://ftp.research.microsoft.com/Users/alvy/Word/7_alpha.doc
ftp://ftp.research.microsoft.com/Users/alvy/Word/4_COMP.doc

These are two technotes written by Alvy Ray Smith about alpha and
digital compositing.  I would recommend anyone check out these 
technotes.  Some of the info is obvious, but it is always nice to 
freshen up.  There are some others in that directory that are 
interesting too.  (There are postscript versions in alvy/PS or 
something.

Word,
Paul
--
Paul Bleisch
bleisch@chromatic.com