Jump to content
  • Advertisement
Sign in to follow this  
schupf

Wireframe & Z-Buffer

This topic is 3700 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

Hi, a little question: Is the z-buffer algorithm in DX10 also performed for triangles rendered in wireframe modus? The reason why I am asking is this: In my terrain renderer I perform front to back sorting for all visible patches, to minimize overdraw. So if I stand right before a big hill then I expect that this hill gets rendered first and all the other patches behind this hill don't pass the z-test and thus aren't rendered at all. But as I rendered my terrain in wireframe mode I was kinda surprised, that I could see all the geometry behind the hill: Image Now I dont know why I can see all the geometry behind the hill close to the camera. Is it because wireframe/z-buffering behavioir is different compared to solid rendering or is there an error in my patch sorting and the patches behind the close hill are also rendered in solid fillmode? Thanks for any help!

Share this post


Link to post
Share on other sites
Advertisement
Guest Lexdysic
The z-buffer algorithm only works on what is drawn. Meaning that it will write to the z-buffer only where it it is drawing the lines, not the inside of the triangles. The inside of those triangles is completely skipped when it is rendering, so there is no way for it be able to write depth values to the buffer.

Share this post


Link to post
Share on other sites
This might help you: To see if my front-to-back sorting works, I use alpha blending. I just draw the objects with an alpha value that depends of the index on the sort list.
That way, first drawn objects will be more translucent and the most opaque objects are the ones that were drawn at last.

P.S. Excuse my english :)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!