Billboarding (alpha blending that is)

I have a tree texture (tga) with an alpha mask and a black background.

I simply want only the alpha values >0 to display, while the alpha values =0 to remain transparent.

I’ve tried:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(1.f, 1.f, 1.f, 0.8f);

But it’s not quite what I want, I can still see the black background, although faded a bit.

Thanks,
e

You have to enable ALPHA testing
I think the call is something like:

glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER,0.0f);

This passes alpha values greater than 0
so that the transparency works

-Drakaza

[This message has been edited by drakaza (edited 10-04-2000).]