Results 1 to 3 of 3

Thread: Lighting and alpha blending

  1. #1
    Member Contributor
    Join Date
    Jul 2001

    Lighting and alpha blending

    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*
    Let's have a funny day

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2000
    Oxford, England

    Re: Lighting and alpha blending

    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.

  3. #3
    Member Contributor
    Join Date
    May 2001

    Re: Lighting and alpha blending

    assuming blending is enabled and the correct blend function is used........

Similar Threads

  1. Replies: 1
    Last Post: 05-01-2013, 09:37 PM
  2. Replies: 3
    Last Post: 06-16-2011, 12:51 PM
  3. alpha blending without modifying destination alpha
    By GordAllott in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-21-2009, 04:15 AM
  4. Source Alpha Blending without an Alpha Buffer
    By niallm in forum OpenGL ES
    Replies: 1
    Last Post: 06-18-2009, 02:51 AM
  5. Alpha Blending & Lighting
    By Spaceman in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-11-2001, 06:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean