• Advertisement
Sign in to follow this  

Items at depth 1.0f not rendering?

This topic is 4741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using Direct3D with auto-managed z-buffering "ON" and am pretty much enabling all the defaults states (with a 16-bit buffer size). I am clearing the whole range every frame. My target video cards tend to be fairly modern Nvidia or ATI cards, but I recently noticed that on some video cards (old cards, on-board video cards) all items which are drawn at a depth of 1.0f are just discarded entirely instead of drawn. Is this a video card issue or am I doing something wrong in my Direct3D code?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I seem to remember seeing that. In one of our games we had a 2D interface and drew everything as Z=1, W=1. On some cards (I believe a RagePro has the issue) nothing would draw. Changing it to be Z=0.5 caused everything to work fine.

I'd assume clearing to 1 and using LESSEQUAL would cause a draw, but 1.0 really is a boundary case of just automatically discarding because it's out of frustum. Perhaps some hardware does a = instead of a >.

Just be aware it's an issue and take care to avoid it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
I'd assume clearing to 1 and using LESSEQUAL would cause a draw, but 1.0 really is a boundary case of just automatically discarding because it's out of frustum. Perhaps some hardware does a = instead of a >.


Ahh... hmm.. I will experiment with ensuring that the correct z-comparison is being set regardless of the default. I didn't realize there were video card differences there.

Share this post


Link to post
Share on other sites
If you are drawing the interface you should generally switch to an ortogonal view perspective instead of using the already defined as there might several unknown issues. And that way you get a much more accurate placement.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement