View Full Version : Lighting and alpha blending

01-21-2002, 08:01 AM
Hi guys ! I would like to know if someone understand why my alpha blended object are not visible if GL_LIGHTING is enable....
I'd like to have lighting on my blended object (tree billboard for example) but it seems impossible for me now...
can someone help ?

*Sleep is a waste of time*

Rob The Bloke
01-21-2002, 08:14 AM
specify the ambient material colour using your alpha values :

float colour[] = {0.5f,0.5f,0.5f,0.5f};

or use glColor*() to specify the colours and use glColorMaterial to specify the ambient colour on a per vertex basis.

Alternatively use an alpha channel in your textures.

01-22-2002, 02:33 PM
assuming blending is enabled and the correct blend function is used........ http://www.opengl.org/discussion_boards/ubb/wink.gif