PDA

View Full Version : Alpha textures



tomster
05-27-2009, 07:00 AM
Hi,

Is it possible to create a texture that has an alpha channel only?
I want a texture that will only affect the transparency of a fragment but use the original color (blended of course).

ZbuffeR
05-27-2009, 08:08 AM
yes.

glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, alphatex);

By default it should modulate with incoming color.