Results 1 to 4 of 4

Thread: Range limited lighting

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2001
    Posts
    8

    Range limited lighting

    DX is able to specify a range for each light. verts beyond this range are not lit by the light, regardless of the attenuation settings used. This is pretty useful in some cases.

    Is it possible to do something similar to this using opengl (and without resorting to vertex shaders)?

    Thanks.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Jan 2001
    Location
    NVIDIA, Austin, TX
    Posts
    555

    Re: Range limited lighting

    You can do it using register combiners on GeForce video cards. Check out this site for a good explanation of how to do it:
    http://www.ronfrazier.net/apparition..._lighting.html

    Jason A.
    DelphiGL (http://delphigl.cfxweb.net)

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Jan 2001
    Location
    NVIDIA, Austin, TX
    Posts
    555

    Re: Range limited lighting

    You may also want to look into the glLight function. It allows you to specify constant, linear, or quadratic attenuation.

    Jason A.
    DelphiGL (http://delphigl.cfxweb.net)

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2001
    Posts
    8

    Re: Range limited lighting

    I am already using the attenuation (as I mentioned). I was hoping there might be a simple extension that supported this range limited behaviour that I was not aware of.

    For example, it would be nice to be able to do something like this...

    sglLightf(GL_LIGHT0, GL_EXT_RANGE, 10.0f);

    to stop a light effecting any verts that are > 10 units away. All verts less than 10 units away are effected by the normal attenuation rules.

Similar Threads

  1. Frame rate limited?
    By Rodrix in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 08-30-2006, 12:22 PM
  2. glPointSize() limited to 1 pixel
    By jellojuice in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-18-2005, 06:46 PM
  3. limited range camera... optimisation idea
    By wizzo in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 08-27-2004, 12:09 PM
  4. Limited number of varying?
    By eriha827 in forum OpenGL: GLSL
    Replies: 7
    Last Post: 07-30-2004, 06:31 PM
  5. geometry limited
    By wu_tie1 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-29-2000, 09:41 PM

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