PDA

View Full Version : gl_FragDepth problem



Little Atuin
08-20-2004, 03:59 AM
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

-NiCo-
08-23-2004, 09:00 AM
I'm having the same problem on a gf6800 GT / winXP combination.

It appears that setting gl_FragDepth has no effect at all.

Nico

Tom Nuydens
08-23-2004, 11:30 PM
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

Tom Nuydens
08-26-2004, 08:48 AM
I've just installed 66.00, and the problem no longer seems to occur.

-- Tom

-NiCo-
08-26-2004, 11:21 PM
Yep, everything seems to work fine now.
Thanks for the tip Tom :)

Nico

Little Atuin
08-27-2004, 01:50 AM
That indeed is excellent news!
Is there any timeframe on when this fix would be available in the linux drivers?