Sign in to follow this  
Harry Lee

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

Recommended Posts

Harry Lee    110
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]
[color=#000000][font=Arial,]Thanks~[/font][/color]
[color=#000000][font=Arial,]Harry[/font][/color]

Share this post


Link to post
Share on other sites
mhagain    13430
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
Harry Lee    110
[quote name='mhagain' timestamp='1329760205' post='4914877']
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.
[/quote]
Tanks very much,I get it.[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
Krypt0n    4721
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
Promit    13246
Need to clear up some confusion.

[b]Back to front[/b] 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.
[b]Front to back [/b]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
Harry Lee    110
[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Yep,Thanks Krypt0n and Promit,you make me more clearly. And Sorry for late to see the replies.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this