Preferred method - alpha channel or alpha texture?

Started by
0 comments, last by MatrixCubed 21 years, 10 months ago
Hello all, I''m adding some color keying support to my engine, and I would like to know what experiences you''ve had with alpha channelling textures (i.e. using RGBA pixel data, which you may or may not have comprised yourself from an RGB texture), versus using a normal RGB image plus a greyscale image used to color-key the first image (a la NeHe tutorial 20). I would assume that the reasoning behind using separate alpha textures is that you can more precisily define ranged alpha values (as opposed to a single 8 bits if you use a channel), or perform effects such as alpha channel animation. I wonder which method is more overkill in my case, where I am animating simple 2D sprites? I would assume using separate textures would be worse for my game, particularly considering the extra texture memory footprint. MatrixCubed
http://MatrixCubed.cjb.net
Advertisement
The two techniques are almost exactly equivalent. GL gets passed the same data either way. The only difference is if you store the alpha map seperately then you can use it to supply alpha values easily to other textures. If you have an RGBA texture it would be a hassle to extract the alpha values in order to apply them in conjunction with a different RGB texture.


Geocyte Has Committed Suicide.
Geocyte Has Committed Suicide.

This topic is closed to new replies.

Advertisement