[SDL] sRGB alpha blending
albert at users.sf.net
Sat Feb 26 18:44:40 PST 2005
On Sun, 2005-02-27 at 00:42 +0100, Xavier Joubert wrote:
> Furthermore as I already wrote, no game coder ever complained about current
> blending in SDL. So, why try to fix something that is not broken ?
Did they know to complain? As you yourself said in another post:
> I knew something was wrong with alpha blending done the
> current way, but didn't knew the rational behind this.
> I saw this recently in a small painting program I'm writing
> for my daughter (and in some old painting programs in the past).
Understandably, the problem was a mystery to you. I don't
recall that you reported the problem. Probably most people
write off the problem as "just some weird error".
Games are definitely affected. Suppose I have an RT strategy
game, sort of like Warcraft or SimCity I guess. (you can tell
I'm not a gamer, huh?) Perhaps the player gets to drag stuff
(buildings, weaponry, etc.) from a toolbar to the world grid.
As he does so, his cursor may be a 50% opaque version of the
object. That won't look right with current SDL blending.
Consider also icons in partially-transparent control overlays.
For example, an item (life juice, key, etc.) selection dialog
might drop down over the main display. It is nice to have the
dialog blending properly, as if it really were translucent.
Spaceship anti-aliasing is a poor example because of the black
background. Try airplanes against a normal daytime sky. With
bad alpha blending, you'll get dark outlines around them.
More information about the SDL