Of View Transforms and Polygon Sorting
Hi,
I was wondering if someone could let me know if I am the right track with this one. I am using Alpha-Blending to simulate translucent objects so the Z Buffer must be deactivated to avoid occlusion. This leads to the need to Sort the objects into z order to ensure they are drawn in the right order (Front-to-Back). However before sorting can occur the objects must be oriented to the View Axis and there in lies the problem. It seems a bit redundant to me because DirectX then transforms the world to view co-ords after you draw the objects in order, but you already have the View Co-ordinates calculated when you sorted. So would it be more effective to set the View Matrix to the Identity Matrix and use your calculated figures OR only orient the Z-Co-ords to the View for sorting and leave the rest to Direct X View Transform. Of course I may have this all around the wrong way so any advise would be helpful. Thanks in advance!
Why not just shoot a ray from the camera position to the object position, take the magnitude (dont bother with the square root) and sort by that? I dont see any real need for transforming every vertex on the object, it seems like a lot of extra work for nothing. Shout if ive missed something obvious...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement