setting alpha to 0 but still see objects?

Hello,

I have a vertex shader where I am trying to have the visibility of some terrain fade out at some distance from the viewpoint. I was trying to ramp the fragment color alpha down from 1.0 to 0.0 to do this. That should work, shouldn't it?

Anyway I notice that even when I explicitly just set the fragment color to 0, the objects are still visible. Shouldn't setting the fragment color w value to 0 make it invisible?

No. Alpha doesn't mean anything by itself. It's just a number. It only takes on a meaning based on what you do with it. If you want alpha to make something transparent or transluscent, you will need to employ blending and key the blend function off of the alpha.