View Full Version : transparency: RGBA or BLENDING ?

07-08-2002, 01:35 AM

i want to do sth with transparent textures. it has to be sth fast, for it should be part of a simple game engine:

what i want to achieve is a texture representing a branch with leafs. when mapping it onto some vertices, i want every pixel to be transparent thats not part of the branch or one of the leafs.

is the better (comfortable and fast) way to do this with TWO textures and use one as a mask, or to use ONE texture with RGBA-values??


07-08-2002, 01:48 AM
Use alpha-test - RGBA texture with the alpha bits set to zero for the transparent pixels.

07-08-2002, 02:16 AM
damn, i feared you would say that, for i havent found a good tutorial on this yet. (neither on gametutorials.com nor from NeHe)

do you know a good one?

07-08-2002, 02:29 AM
Erm - do a google for file formats that support alpha channel - I think DirectX SDK comes with one (which you can use for generating textures for OPenGL anyway).

Actually getting alpha test up and running is a piece of cake.

07-08-2002, 03:04 AM
ah, ok, i think i found a suitable example. thank you http://www.opengl.org/discussion_boards/ubb/smile.gif