Open robpieke opened 1 month ago
Filed as internal issue #USD-10198
It's easy enough to change HdSceneIndexAdapterSceneDelegate
to leverage GetRenderIndex().GetRenderDelegate()->GetMaterialBindingPurpose()
and call HdMaterialBindingsSchema::GetMaterialBinding(TfToken const &purpose)
, which makes the reported test case pass, but I worry this is insufficient as there seem to be other calls to HdMaterialBindingsSchema::GetMaterialBinding()
(i.e., the purpose-less version) scattered throughout the codebase. And by "insufficient", that might actually be "best-case" and it is possibly even worse if there is inconsistency where different codepaths are generating different material bindings.
Previously, the following USD would render blue in Storm and red in RenderMan (as-expected). With
USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX=1
it renders blue in both cases.I see there's a
HdMaterialBindingsSchema::GetMaterialBinding(TfToken const &purpose)
function, but it doesn't look like anything actually calls this.HdSceneIndexAdapterSceneDelegate::GetMaterialId()
goes through the default (i.e., no explicit purpose).