Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Harry Lee   Members   -  Reputation: 110

Like
0Likes
Like

Posted 20 February 2012 - 10:47 AM

Hi,all. I heared many about the bsp's 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?
Thanks~
Harry

Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8282

Like
1Likes
Like

Posted 20 February 2012 - 11:50 AM

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.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 Harry Lee   Members   -  Reputation: 110

Like
0Likes
Like

Posted 20 February 2012 - 12:06 PM

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.Posted Image

#4 Krypt0n   Crossbones+   -  Reputation: 2684

Like
0Likes
Like

Posted 20 February 2012 - 01:03 PM

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.

#5 Promit   Moderators   -  Reputation: 7663

Like
2Likes
Like

Posted 20 February 2012 - 01:10 PM

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.

#6 Harry Lee   Members   -  Reputation: 110

Like
0Likes
Like

Posted 21 February 2012 - 05:12 AM

Posted Image Yep,Thanks Krypt0n and Promit,you make me more clearly. And Sorry for late to see the replies.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS