For some things it works, for others it doesn't, it is terribly temperamental, even when given an alpha layer strange things like this white effect happen if I don't do the black just right at the edges of the transparency.
So what am I doing wrong here? If there is nothing wrong with the png, why does spring do this?
Rattle is right, this is why I stay away from PNG. It doesnt offer anything, since the image will be compressed in sd7-sdz anyway, and png just adds another decompression step upon loading mod.
It might seem silly but png is good for me because for things like CeG sprites I can see the thumbnail in windows and it speeds up my ceg development. which is important when generating sparkle cannons..
Normal alpha is rendered with SRC_ALPHA, DEST_ONE_MINUS_ALPHA but Spring uses SRC_ONE, DEST_ONE_MINUS_ALPHA. Basically the color channels are drawn additive and the alpha channel is drawn multiplicative (i.e. the alpha darkens stuff while the color brightens). If you leave alpha completely black you get additive blending.
PNG offers a variety of transparency options. With truecolor and grayscale images either a single pixel value can be declared as transparent or an alpha channel can be added (enabling any percentage of partial transparency to be used). For paletted images, alpha values can be added to palette entries. The number of such values stored may be less than the total number of palette entries, in which case the remaining entries are considered fully opaque.
Pretty sure that this is the reason for this issue.
I've run some experiments trying to replace zk's default orange ball cannon projectile with something nicer. Here's what:
- TGA with no alpha channel: additive blending, with black (i.e, shaded darker; not fully transparent) mask for #000 pixels. Might be something card-specific, but the masking makes it pointless for me. - TGA with an alpha channel: 1-bit transparency. - TGA with an all-black alpha channel (i.e, zero opacity): nothing drawn. - TGA with an all-white alpha channel (i.e. full opacity): additive blending as above, dark box around projectile as above.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum