SFML community forums

Help => Graphics => Topic started by: Leprosy on December 10, 2010, 01:38:28 pm

Title: Transparency mask from colour vs PNG Alpha
Post by: Leprosy on December 10, 2010, 01:38:28 pm
Hey,

Just a quick question. Searched the forum and couldn't find anything, My apologies if it has been covered (I'm sure that it has).

Which would be faster when working with pixel art?
a) Setting a colour to be transparent (using CreateMaskFromColor)
b) PNG with transparency
c) Doesn't matter

I only ask because I used XNA in uni for a few months and using a lot of PNG transparency can potentially cripple a program.

Thanks a lot!
Title: Transparency mask from colour vs PNG Alpha
Post by: Laurent on December 10, 2010, 02:31:43 pm
It makes absolutely no difference.

PNG is more flexible since you can use any alpha value, whereas with CreateMaskFromColor it's either 100% opaque or 100% transparent.
Title: Transparency mask from colour vs PNG Alpha
Post by: Leprosy on December 10, 2010, 03:21:42 pm
Cheers thanks.