Original Post
Hey, thanks for reading this. I'm trying to test pixels for position in my shader to determine if they're on the edge of my terrain. When I debug pixels in PIX, quite often I get a message "This pixel was eliminated because it failed the depth test", and whenever that happens the pixel has this bizzare position that can't possibly be correct. Apparently this is due to a pre-test in the Z buffer to eliminate as many pixels as possible before sending them to the shader. SO... 1. What is this position info? Am I reading defunct information from a deleted pixel? 2. If the pixel is being eliminated by a depth test, why is it hitting the vertex shader at all? 3. In my shader, when I test the pixel for position, how can I tell if I'm reading bad info from an eliminated pixel (i.e., how can I tell if the pixel I'm reading has failed the depth test), so that I can discard the info? Thanks again for your help.