[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alpha blit question
On Tue, 14 Apr 1998, Sam Lantinga wrote:
> When implementing a source alpha blit, is it better in general to use
> a separate alpha surface (faster in software) or extract the alpha
> information from each pixel (faster in hardware) ?
Extracting the alpha is always faster on the PPC, because it doesn't
thrash the cache as much. I expect the same will hold on Pentiums,
because although they cant bitfield extract to save themselves
> Hardware accelerated 2-D alpha blending is very rare at the moment.
Not with 3D cards :)
> Also, the semantics of the source alpha value are:
>
> As alpha goes up, the amount of the source blended goes down.
>
> right?
> (I thought real alpha was a measure of opacity, not transparency)
Have a look at
ftp://ftp.cs.monash.edu.au/users/njh/N/*
That is a windowing system with real-time dragging, scalling and alpha
channels(+ lots of other groovy things) that a friend and I wrote last
semester. We took the meaning of alpha channel as a measure of the amount
of ink on clear sheets(of virtual acetate !), 0 = solid, 255 =
transparent. That way combination is simply multiplication.
You might try porting N(or h, as it became known.. :) to SDL, as it
proveds a nifty game windoing environment for titles etc(it even has fully
antialiased truetype fonts). Or, I might port it...
njh