We received a report that footprint samples aren't working properly. It turns out that the depthPriority wasn't implemented correctly.
The original samples are using fixed depth(5) and when the node is duplicated, the old one is still on top of it. We can determine a proper depth with MGeometryUtilities::displayStatus.
unsigned int depthPriority;
switch(MHWRender::MGeometryUtilities::displayStatus(path))
{
case MHWRender::kLead:
case MHWRender::kActive:
case MHWRender::kHilite:
case MHWRender::kActiveComponent:
depthPriority = MHWRender::MRenderItem::sActiveWireDepthPriority;
break;
default:
depthPriority = MHWRender::MRenderItem::sDormantFilledDepthPriority;
break;
}
You also have to replace the depth settings. For footPrintNode sample, we are going to set depth with MDrawManager::setDepthPriority. For footPrintNode_GeometryOverride, it is using render items; so it is MRenderItem::DepthPriority.
Comments
You can follow this conversation by subscribing to the comment feed for this post.