• Advertisement

Archived

This topic is now archived and is closed to further replies.

Preferred method - alpha channel or alpha texture?

This topic is 5734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement