Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Z Buffers in 2D

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

Thanks for the answer.

When writing this kind of question I probably should describe what I intend to do in order to get an answer that applies to me.

I''m doing a windowing system where windows can be transparent. My first thought solution was to draw the windows from back to front.

However, now I''m thinking that by using z buffers, I can benefit from some Direct3D optimization. I include depth information for each window, and D3D will only draw what is needed.

Is it worth the effort?

Probably the answer depends on how many windows I will have, and the answer is that there won''t be that many. And in most cases, more than half of the windows will need to be painted.

Share this post

Link to post
Share on other sites
And just when I asked the question, I found the answer... From the D3D documentation:

"If the overdraw averages less than 2, you can achieve the best performance by turning z-buffering off and rendering the scene from back-to-front."

"Overdraw is the average number of times that a screen pixel is written to."

Search and ye shall find...

Share this post

Link to post
Share on other sites

  • 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!