Jump to content
  • Advertisement
Sign in to follow this  
Harry Lee

Is bsp for back to front sorting rendering still useful nowadays?

This topic is 2342 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,all. I heared many about the bsp's [color=#000000][font=Arial,]nice property for back to front rendering.But they are just very old discussing.So I want to ask nowadays is it still useful or pratical?[/font]
[color=#000000][font=Arial,]Thanks~[/font]
[color=#000000][font=Arial,]Harry[/font]

Share this post


Link to post
Share on other sites
Advertisement
It depends on what you're drawing. If you've got simple, lightweight data (and not much of it) and a low amount of overdraw you can do back-to-front with depth testing disabled and depth writing enabled - this approach is actually highlighted in the DirectX SDK - in the "Performance Optimizations (Direct3D 9)" section, right at the bottom (under the heading "Z-Buffer Performance").

Where it breaks down is that it will likely involve a lot of state/material/texture changes, impairing your ability to get good draw call batching going. It's also mostly obsoleted by hardware that can do early Z rejection. Grouping your objects by state/material/texture and drawing them roughly front-to-back as much as possible, with or without a Z-prepass, will get you better on modern hardware.

Share this post


Link to post
Share on other sites

It depends on what you're drawing. If you've got simple, lightweight data (and not much of it) and a low amount of overdraw you can do back-to-front with depth testing disabled and depth writing enabled - this approach is actually highlighted in the DirectX SDK - in the "Performance Optimizations (Direct3D 9)" section, right at the bottom (under the heading "Z-Buffer Performance").

Where it breaks down is that it will likely involve a lot of state/material/texture changes, impairing your ability to get good draw call batching going. It's also mostly obsoleted by hardware that can do early Z rejection. Grouping your objects by state/material/texture and drawing them roughly front-to-back as much as possible, with or without a Z-prepass, will get you better on modern hardware.

Tanks very much,I get it.smile.png

Share this post


Link to post
Share on other sites
it can be still useful to sort alpha blended geometry back to front. on the other side you would use rather front to back sorting on solids, as the fast zbuffer would reject invisible pixel perfectly, and the picrlshader cost is nowadays the common limiting factor.

Share this post


Link to post
Share on other sites
Need to clear up some confusion.

Back to front rendering is called the painter's algorithm, and its use in a BSP tree is meant to produce correct images in the absence of a depth buffer. It should be obvious that this technique is no longer relevant today, as high performance full size depth buffers are readily available.
Front to back rendering is used to minimize the amount of overdraw by culling out pixels by depth before they are ever processed. This can be useful, but tends to pale in comparison to more state oriented optimizations. BSP can be used this way, and it might be more convenient in some cases, but it's not very likely to be a performance win over the more conventional optimizations you can do.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!