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]
Is bsp for back to front sorting rendering still useful nowadays?
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.
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 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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement