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: Reading buffer values in fragment shader

  1. #1
    Intern Contributor
    Join Date
    May 2001
    Location
    Cheltenham,Gloucestershire,England
    Posts
    59

    Reading buffer values in fragment shader

    Hello all,

    is it possible to read the current depth buffers and color buffers value for a given raster position in a fragment shader?

    If not i guess i'll have to create a pbuffer and render the depth buffer and color buffer into that prior to using the shader and access it as a texture unit.

    Cheers

    Mark

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

    Re: Reading buffer values in fragment shader

    No, this is not possible with current hardware. You'll need to copy the depth and color buffers into textures if you want to read them from the fragment shader.

  3. #3
    Intern Contributor
    Join Date
    May 2001
    Location
    Cheltenham,Gloucestershire,England
    Posts
    59

    Re: Reading buffer values in fragment shader

    Right ho cheers, thought it might be the case but id check first.

Posting Permissions

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