On Thu, Jan 29, 2009 at 6:51 PM, Hordeling <[email protected]> wrote: > 2a. Going back to the fire example, there seem to be two images > FIRE.JPG and FIRE.PNG - the former has no alpha channel, the latter > has a transparency channel. It looks like the demo is using the JPG > and thus handling alpha manually. Is that true? Is it necessary or > can I use PNG with transparency/translucency? or TGA with an alpha > channel?
It depends on what you want to do. The particles in the example are fire, so they are supposed to be "glowing". To achieve a glowing effect, what you do is not paint over, but *add* colors (check the glBlend function being used, and the documentation for glBlend if you don't know what I am talking about :) ). So, the black border in the jpg is actually "add 0". The alpha channel is not used for blending the particles. if you wanted snowflakes, or something that overlaps but does not add brightness to the image (I guess they aren't radioactive snowflakes), you should use alpha and a different blending function. if you wanted to do some "darkening" effect (smoke, for example), you need another blend function (substraction), and again a monochrome image. Regards, D. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
