re-sorting triangles from a polygon soup.
Hi,
The models in my application are polgon soups. Each model is constructed of smaller subsections, in a hierarchy, and this is used for culling.
The question is, what methods are there for re-ordering the triangles by order of depth, to allow proper alpha blending, without implementing a different model format?
Thx.
You either :
a) Render on triangle basis - with this you'll be able to sort all triangles as you want.
b) Render on sub-model basis (subsections) - with this you won't get all triangles as you want, but is probably a lot faster way to go for.
a) Render on triangle basis - with this you'll be able to sort all triangles as you want.
b) Render on sub-model basis (subsections) - with this you won't get all triangles as you want, but is probably a lot faster way to go for.
My method is to pass meshes to the renderer, which then strips out all the triangles and stores them in an std::vector. When all models are passed in, all triangles are rendered. I did, however, need to add texture information to the storage struct within the renderer, with a link to the texture being used for that triangle.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement