PDA

View Full Version : Lighting and alpha blending



Evil-Dog
01-21-2002, 09: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 ?
Thanks

------------------------------------
Evil-Dog
*Sleep is a waste of time*

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

float colour[] = {0.5f,0.5f,0.5f,0.5f};
glMaterialfv(GL_FRONT,GL_AMBIENT,colour);

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.

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