[Scummvm-devel] Alpha blending (0.13.0)

Max Horn max at quendi.de
Fri Feb 13 16:28:45 CET 2009


Am 13.02.2009 um 10:13 schrieb Joost Peters:

> Marcus Comstedt schreef:
>> Hi guys.
>>
>> I've fixed the function VectorRendererSpec::blendPixelPtr() on
>> the release branch to handle the alpha channel correctly, in
>> order to fix the regression that the menus were looking crap
>> on the DC.  :-)
>> [...]
>> I've tested the code on the Dreamcast and on Linux with the SDL
>> backend, but it would be good to test it on the PSP as well,
>> since it has a different alpha format from both these.  Joost?
>
> Hi Marcus,
>
> Sorry for the delay in replying.   Seems to work fine on PSP as far  
> as I
> can tell.


I should add at this point that yesterday, I modified the  
VectorRendererSpec / VectorRendererAA code on trunnk (*not* the  
release branch) to use Graphics::PixelFormat instead of ColorMasks.  
This way, the same code should work on arbitrary graphics surfaces,  
with arbitrary color formats (well, 16 bit only for now, but it would  
be easy to allow 32 bit pixels, too). Drawback: It will be slower now,  
again. But I have no idea what impact that would have, exactly. In  
particular, very frequently called core routines like blendPixelPtr()  
now use R/G/B/alpha masks stored in (const) member variables, instead  
of compile-time constants. This could conceivably cause slow downs; or  
it might be almost as fast after all. Hard to say from here.

So, what would be really nice is some serious benchmarking / profiling  
of VectorRendererSpec / VectorRendererAA on some low-spec platforms,  
to find out if and where there are bottlenecks. And then we can try to  
make it faster.


Cheers,
Max






More information about the Scummvm-devel mailing list