i believe gl_FragDepth is what u write the output depth value u want to
if u wanna access the current depth value (interpoltaed from the vs) use gl_FragCoord.z
Somewhat related to this, when I try to read from gl_FragCoord I get some weird flicker of death, nothing gets rendered and it seems as if the rendering context goes out of whack, glIntercept reveals no issues.
The rather startling thing is that another shader (not coded by me) that uses it in a far more complex manner works fine.
ATI radeon 9600 pro, and catalyst drivers that are no more than 2 months old, I’ll get some new ones to be sure.
Unfortunately, using catalyst 6.4 drivers don’t help. Can anyone confirm any strange behaviour when trying to read from gl_FragCoord (I can’t do anything at all with it)?