View Full Version : Texture Vs Geometry Alpha Problem

01-06-2005, 05:30 AM
I have a 32 bit texture that I want to render, ignoring the alpha components in the texture. However, I do need to use the alpha of the geometry that the texture is applied to, so I can't simple disable blending. Also, the texture data is generated in realtime (not by me) and updated by me with glTexSubImage. I need the maximum performance of texture update so I cannot simple modify the colour depth of the image data to 24-bit before upload.

I have tried several methods, including different blending functionn, but do not seem to be able to create the correct end result.

Any help in this would be much appreciated.

01-06-2005, 06:21 AM
If you want to have total control over what you are doing, you could use shaders (GLSlang/ARBfp).
Of course if your target hardware allows it.

Besides, is performance of reading into 3-component texture so bad (I haven't tested it myself)?

01-06-2005, 08:13 AM
can't you just set your texture application to GL_DECAL?

something a little like this:

that should ignore the texture's alpha channel.