Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: twosided lighting

  1. #1
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    twosided lighting

    whats the calculations for doing twosided lighting correctly?
    i know its pretty easy but i spent an hour on it and didn't really get anywhere

    cheers zed

  2. #2
    Advanced Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    750

    Re: twosided lighting

    Well, the gl simply flips the normal and uses the back face material properties; otherwise, the base lighting calculations are the same.

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: twosided lighting

    cheers
    as they say here in oz, 'to easy!'
    another case of me trying to over complicate things

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: twosided lighting

    got it working my problem was i had the idea in my head i had to do something with the light direction vector.
    when i just needed to find out if the polygon is backfacing from the cameras viewpoint

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •