[Scummvm-devel] 16bit alpha blending

Max Horn max at quendi.de
Mon May 2 13:14:35 CEST 2011


Am 20.02.2011 um 18:01 schrieb Marcus Comstedt:

> 
> Johannes Schickel <lordhoto at scummvm.org> writes:
> 
>> I am not sure whether we should really allow more alpha blending on the 
>> cursor surface than either drawing a pixel (full alpha) or not drawing 
>> it (alpha is zero). That of course still requires some checking by the 
>> backend that the cursor surface data does not use alpha values in 
>> between. On the other hand IIRC even the 16bpp engines are using a 
>> colorkey for the cursor at the moment.
>> 
>> Since there is currently no engine (that I am aware of), which wants to 
>> take advantage of an alpha value on the cursor, it feels like over 
>> engineering if we would add support for multiple blending modes now.
> 
> Well, for now we could say that
> 
> 1) only max (~0) or min (0) alpha is allowed (trivially fulfilled for
>   ARGB1555 :)
> 2) a pixel with min alpha must have all colour channels (RGB) set to
>   0 as well
> 
> In this case it doesn't matter if the backend uses pre-multiplied
> alpha or not, the result will be the same.
> 
> I don't think the backend should really spend time actually checking
> this, except possibly as some kind of lint mode (implemented in some
> commonly used backend) to help find engine bugs.

Looking back at that thread, I saw no real opposition to this proposal (but maybe I missed it?). Anyway, unless somebody objects, I suggest going ahead at least with this simple "for now" policy -- i.e. document it as such in common/system.h and maybe remind people here on -devel about it (e.g. by replying to this thread once / if it has been implemented9.

Bye,
Max



More information about the Scummvm-devel mailing list