[Scummvm-devel] 16bit alpha blending
Johannes Schickel
lordhoto at scummvm.org
Sun Feb 20 18:25:24 CET 2011
On 02/20/2011 06:01 PM, Marcus Comstedt wrote:
> 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
Is there any rational behind 2, apart that it's easier to check against
0 than to only check the alpha channel in backends which need to do
software "blending"?
> 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.
>
Sure that would be possible too.
// Johannes
More information about the Scummvm-devel
mailing list