Sorting alpha polys
by Andy Hawkins · in Technical Issues · 03/01/2007 (11:30 pm) · 0 replies
I know that in order to display all alpha polys in a scene you have to draw then last, do a bubble sort and render them after the opaque geometry is drawn. Using the default methods in Directx 9 ( not D3DX ) it would seem possible - this is my theory - because for each object it breaks it down into materials, and draws each subset of polys with common materials one after the other.
So the theory I have to do this, is detect any materials with an alpha component, and store those polys away til later. Then iterate through the alpha polys for every poly in the scene, bubble sort them and render from the bubble sort index.
Is this what "normal" people do or am I looking at it the wrong way? Maybe most people bubble sort per object?
So the theory I have to do this, is detect any materials with an alpha component, and store those polys away til later. Then iterate through the alpha polys for every poly in the scene, bubble sort them and render from the bubble sort index.
Is this what "normal" people do or am I looking at it the wrong way? Maybe most people bubble sort per object?