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

Thread: gl_FragDepth problem

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Leuven, Belgium
    Posts
    3

    gl_FragDepth problem

    I've run into problems when trying to set the depth of a fragment using gl_FragDepth.
    My aim is to offset the object to the front a bit while using a depthtest, as to achieve a 'band' similar as one would use polygon_offset.

    However, gl_FragDepth behaves very strangely.
    It renders ok when we would write:

    gl_FragDepth = gl_FragCoord.z;

    and it EVEN COMPILES AND RUNS when I say:

    gl_FragDepth = gl_FragCoord.z + 1; // SHOULD GENERATE TYPE CAST ERROR

    When I use:

    gl_FragDepth = a;

    with a between (0.0, 1.0) :-) gives always the _same_ erroneous depthmap.

    I got this strange behaviour under linux (driver 61.11) using a GeForce FX 5200.

    thnx

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    999

    Re: gl_FragDepth problem

    I'm having the same problem on a gf6800 GT / winXP combination.

    It appears that setting gl_FragDepth has no effect at all.

    Nico

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: gl_FragDepth problem

    I'm on version 61.77 (win2k), same problem. I experienced it on GeForce FX as well as on 6800. Maybe it only happens in Belgium, though?

    I'll contact NVidia and see if/when we can expect a fix.

    -- Tom

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: gl_FragDepth problem

    I've just installed 66.00, and the problem no longer seems to occur.

    -- Tom

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    999

    Re: gl_FragDepth problem

    Yep, everything seems to work fine now.
    Thanks for the tip Tom

    Nico

  6. #6
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Leuven, Belgium
    Posts
    3

    Re: gl_FragDepth problem

    That indeed is excellent news!
    Is there any timeframe on when this fix would be available in the linux drivers?

Posting Permissions

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