vitek wrote:The scene manager sorts transparent scene nodes in back to front order. Have a look at the declaration of TransparentNodeEntry in CSceneManager.h. The comparison function puts nodes further from the camera first in the sorted render queue.
Travis
Thanks, but problem not in the sorting of the transparent node
S but in sorting of triangles what belongs to
ONE transparent node.
I am using
ONE COctTreeSceneNode for scene representation, so sorting algorithm dosent works here as we have only one scenenode.
Octree rendering irrlicht code:
Code: Select all
LightMapOctTree->calculatePolys(frust);
OctTree<video::S3DVertex2TCoords>::SIndexData* d = LightMapOctTree->getIndexData();
for (u32 i=0; i<Materials.size(); ++i)
{
video::IMaterialRenderer* rnd =
driver->getMaterialRenderer(Materials[i].MaterialType);
bool transparent = (rnd && rnd->isTransparent());
// only render transparent buffer if this is the transparent render pass
// and solid only in solid pass
if (transparent == isTransparentPass)
{
driver->setMaterial(Materials[i]);
driver->drawIndexedTriangleList(
&LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
}
}
As you can see irrlicht dosent supports triangle sorting.
