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 2 of 2

Thread: 2-passes bump mapping / multiple lights

  1. #1
    Intern Newbie
    Join Date
    Feb 2003
    Location
    france
    Posts
    48

    2-passes bump mapping / multiple lights

    -I am trying to get bump mapping with multiple lights.
    -I have stencil shadows and the scene is drawn one light by one light.
    -Each "light pass" is added to the previous one using additive blending.
    -I need 2 passes to get my bump (I have a GeForce 2) for each light.
    The result is really bad.
    screenshots

    F: frame buffer
    N: dot3 pass
    D: diffuse pass
    For now it is:
    F = (N+F)*D
    What I need (I think):
    F = F + (N * D)

    The solutions I have are:
    - buy something better than a GeForce 2 to do my bump in only one pass.
    - find register/blending/texture settings to do it (I don't know if it is possible)
    - use the accumulation buffer.

    I'd like to try the third one like this:

    for each light
    clear the frame buffer
    // here I already have my stencil shadows
    render the objects using as many passes they need
    if first light
    copy the frame buffer to the accumulation buffer
    else
    add the frame buffer to the accumulation buffer
    end
    copy accumulation buffer to the frame buffer

    Is the second solution possible ?
    Is the third solution possible ?

    Thanks.

  2. #2
    Intern Newbie
    Join Date
    Feb 2003
    Location
    france
    Posts
    48

    Re: 2-passes bump mapping / multiple lights

    I tried the accumulation buffer solution...It is too slow and I think I need more "bits" to avoid the black effect.
    (link to the screenshots in the previous post)

Posting Permissions

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