Any ideas in how to solve this ?
Code: Select all
// Different renderables, sort by depth
Real adepth = a.renderable->getSquaredViewDepth(camera);
Real bdepth = b.renderable->getSquaredViewDepth(camera);
if (Math::RealEqual(adepth, bdepth))
{
// Must return deterministic result, doesn't matter what
return a.pass < b.pass; //THIS IS THE ISSUE
}
else
{
// Sort DESCENDING by depth (i.e. far objects first)
return (adepth > bdepth);
}
In this line
Code: Select all
return a.pass < b.pass; //THIS IS THE ISSUE