Direct X alpha sorting

Miscellaneous Forums/General Discussion/Direct X alpha sorting

Hi I just have a quick and somewhat random question. In a discussion on another forum someone said that the issues with drawing overlapping alpha transparent polygons no longer applies to Direct X. I initially dismissed his comment as uninformed fanboyism (the main discussion had a side discussion about OpenGL vs. DirectX after all,) but then it dawned on me that I may be the uninformed one, as I haven't paid attention to advancements in Direct X since version 8.

Is he correct that there are no longer issues with alpha transparency when using Direct X?

Hi,

As far as I know, there are no 'easy' ways to do proper transparency when dealing with (current tech) zbuffer based hardware, regardless of API.

This is due to the way zbuffers work, and given that they're pretty entrenched (and nicely optimized) tech by now I can't see that changing in the near future.

There are other techniques for dealing with transparency such as depth peeling or stippling, but again, they are not unique to any particular API - and they all require more work than just drawing opaque polys.

I strongly suspect fanboyism...and the stupid thing is, since d3d7 there has been very little functional difference between the 2 API's anyway.

I did a little googling on DirectX 10, and found this:
Games often use polygons with transparent portions (alpha textures) to representcomplex geometry such as leaves, chain-linked fences, and railings. Unfortunately when alpha textures are rendered, the intersection between the opaque and transparent portions show heavy aliasing. Alpha blending can solve this problem, but requires that polygons be sorted and rendered in back-to-front order. This is currently infeasible to do without a large performance penalty.

DirectX 10 includes support for a technique called alpha to coverage. Using this scheme, partially transparent alpha values are resolved using multisample antialiasing. This gives the transition a smooth, antialiased edge without the performance penalty of alpha blending. Outdoor games with heavy use of foliage will benefit greatly from this feature.

http://static.tigerdirect.com/pdf/NVIDIA_Microsoft_DirectX-10_Technical_Brief.pdf

Sounds like a version of alpha-rejection with a anti-alias style filter used on the edges to give a smooth appearance.

With this technique, you'd be able to achieve the visual quality of a tree with alpha-blended transparent leaves, but with no need to z-sort.

But if I understand the technique correctly, this does not solve all alpha sorting issues, but it can solve a large majority of the problems associated with alpha blending. It does this not by "solving" the alpha-sorting issue, but by approaching the problem in a different way.


I did a little googling on DirectX 10, and found this:


Interesting technique! But yeah, it only handles 'alphamask' situations.

And for the fanboy...

http://www.opengl.org/news/permalink/alpha_to_coverage_demo_test_using_gl_arb_multisample_opengl_extension/

...don't forget to point out the date on that!

Ah, thanks for the info guys!

There is a little problem with this great tech anyway.

If you played any of the DX10 games actually on a mid range DX10 card you see that they cost as much performance as they look nice.

Not beeing able to run DX10 games on 8600GT just means that someone had more stupid ideas than NVIDIA and ATI will be able to usefully deliver this and the next generation.