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

Thread: How to compositing images with depth ?

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    2

    How to compositing images with depth ?

    I am a beginner in OpenGl. I am programming a parallel rendering system.
    I want to know how to composting images with depth in an efficient way using OpenGL. thanks a lot .

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: How to compositing images with depth ?

    hi.
    do you mean: i have 2 color buffers and 2 depth buffers and i want to mix them using opengl ?
    if so, create 2 RGBA textures with the color buffers, set the alpha component with the depth.
    in ortho mode, draw a quad that fit the screen with the first texture. then activate alpha test (parameter: GL_LESS)and draw a second quad with the second texture.

    take care of texture filtering which could create artefacts.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2004
    Posts
    2

    Re: How to compositing images with depth ?

    Thank you yoyo, Let me try.

Posting Permissions

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