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

Thread: Depth value in vertex / pixel shaders...

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Depth value in vertex / pixel shaders...

    I don't think that the vertex or pixel shaders currently give the developer access to the vertexes' or pixels' depth in the depth buffer. Having the depth for both the source and the destination would allow for very nice fog and mist fx.

    I have not had the chance to use the shaders yet (not enough cards support the feature), but I really like the focus on them.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Depth value in vertex / pixel shaders...

    I just wanted to bring back an old post that no one responded to.

    What do you think?

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,633

    Re: Depth value in vertex / pixel shaders...

    But of course you have access to vertex depth. After transforming through modelview and projection. Ok, I didn't read up enough on that, but it wouldn't surprise me if you could get that value (interpolated) over into the fragment shader. Anything missing?

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Depth value in vertex / pixel shaders...

    Is that per fragment in the shader or is this a get the matrix and do your own math sort of thing?

Posting Permissions

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