Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domelight sync fix #717

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pxr/imaging/plugin/hdRpr/domeLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ bool ResolveRat(std::string& path) {

HdRprDomeLight::HdRprDomeLight(SdfPath const& id)
: HdSprim(id) {
CreateOverrideEnableParmIfNeeded(id);
}

void HdRprDomeLight::Sync(HdSceneDelegate* sceneDelegate,
Expand All @@ -299,6 +298,11 @@ void HdRprDomeLight::Sync(HdSceneDelegate* sceneDelegate,
auto rprApi = rprRenderParam->AcquireRprApiForEdit();

SdfPath const& id = GetId();
// Lazy parm initialization to avoid synchronization issue https://amdrender.atlassian.net/browse/RPRHOUD-112
if (!m_parmCreated) {
CreateOverrideEnableParmIfNeeded(id);
m_parmCreated = true;
}
HdDirtyBits bits = *dirtyBits;

if (bits & HdLight::DirtyTransform) {
Expand Down
1 change: 1 addition & 0 deletions pxr/imaging/plugin/hdRpr/domeLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class HdRprDomeLight : public HdSprim {
protected:
HdRprApiEnvironmentLight* m_rprLight = nullptr;
GfMatrix4f m_transform;
bool m_parmCreated = false;
};

PXR_NAMESPACE_CLOSE_SCOPE
Expand Down