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

Thread: FBO, cubemap and depthmap

  1. #1

    FBO, cubemap and depthmap

    Hi everyone!

    I would like to implement shadow mapping for point light by rendering the depth in a cubemap. I don't use geometry shader to render it in one time. I have two 7900GTX in SLi.

    The problem is that when I attach a depth render buffer, one for each FBO, each one attached to one face, the framerate is very low. However, when I do not attach the depth render buffer, the framerate is high.

    Do you know where is the problem?
    Do attaching a depth map to a FBO is supported only by G80 processor? Even with a GF7900 I need to render my point light as 6 spot?

    Thank you.
    website : sebastien.hillaire.free.fr

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: FBO, cubemap and depthmap

    Do attaching a depth map to a FBO is supported only by G80 processor?
    I hope so!

    You could try to create only one fbo with one depth render buffer. You can later attach each face texture to fbo color attachment and render to texture. It would save memory and maybe run faster.

  3. #3

    Re: FBO, cubemap and depthmap

    Ok. I wanted to say : Do attaching a depth map to a FBO "for cube map" is supported only by G80 processor? ;-)

    About the single depthmap : I have tried this solution but when I saw that it was slow, I think that it could be due to the dynamic attachment. So I created one depth map for each face...

    Today, what are the solution to render into a cubemap with depth testing without having a G80 card? (except glCopytexture and pixelbuffer)
    website : sebastien.hillaire.free.fr

  4. #4
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: FBO, cubemap and depthmap

    There was a similar problem here about glFramebufferTexture2DEXT performances here:

    glFramebufferTexture2DEXT slow

    Maybe this could help you.

  5. #5

    Re: FBO, cubemap and depthmap

    Thx.

    I have choosen to develop a virtual depth environment map unsing an indirection cubemap.
    I hope it will be fast enough...
    website : sebastien.hillaire.free.fr

  6. #6
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: FBO, cubemap and depthmap

    virtual depth environment map
    what is this?

  7. #7

    Re: FBO, cubemap and depthmap

    ok perhaps the term virtual depth cube map is better ;-)

    Basically, I have one 2D texture in wich I will render each face of the cube map (+X, -X, +Y...) and these one will only be a depthmap. Then, during the shadow algorithm, I use the direction vector to read the cubemap. However, I do not read the depth but a uv coordinate which tell me where I have to look in the 2D texture to read the depth (the indirection cubemap).

    It's only one texture read more than the algorithm I originally wanted.
    website : sebastien.hillaire.free.fr

  8. #8
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: FBO, cubemap and depthmap

    Ok thank you, I understand now. Is this shadow mapping with point lights?

  9. #9

    Re: FBO, cubemap and depthmap

    Yep....

    I have almost finished...
    website : sebastien.hillaire.free.fr

Posting Permissions

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