[SDL] sRGB alpha blending

Xavier Joubert xavier.joubert at free.fr
Sat Feb 26 15:42:27 PST 2005


Hi David,


Selon David Olofson <david at olofson.net>:
> Fixed Rate Pig uses AA for all sprites, and translucency for a good
> deal of them at that, and still achieves frame rates in the thousands
> with s/w rendering on my old P-III. I don't think it would be an
> issue if the alpha blending was a few times more expensive - though
> it would probably rule out old Pentium and 486 machines.

Don't forget PC is not the only hardware SDL runs on... Mobiles phones are much
more limited.

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 ?

> > I see one way to handle this dilemna : implement a new
> > SDL_BlitSurfaceAccurateBlending() function that would use sRGB
> > conversion. This one would of course not be hardware accelerated,
> > and so not recommended on hardware surfaces.
> ...you *can* h/w accelerate this, and much more, with pixel shaders.
> That way, you can do it properly while running in circles around the
> current s/w blitters.

I guess so, but since games don't need it, and since painting programs don't
need speed, why waste time ?


Xavier




More information about the SDL mailing list