Skip to content

Commit 495e00b

Browse files
blevinpixar-oss
authored andcommitted
[hdPrman] Fix bug where non-color AOV's would receive
the rendering colorspace display filter transform. The excludeAOVs list needs to include both the given name and source name of AOV's due to how there may be multiple display entries in RenderMan, using one form or the other. (Internal change: 2420162)
1 parent 74c4c4c commit 495e00b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

third_party/renderman/plugin/hdPrman/displayColorSpaceSceneIndexPlugin.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,27 @@ _BuildExcludeAOVsList(const HdContainerDataSourceHandle& rsPrimDS)
121121
// matching how HdPrman creates AOVs.
122122
const SdfPath varPath = pathDs->GetTypedValue(0.0f);
123123
uniqueAOVs.insert(varPath.GetName());
124+
125+
// Also exclude the sourceName of the AOV, since it
126+
// make be created as an additional Display and
127+
// we need to ensure that PxrColorDisplayTransform
128+
// does not modify it.
129+
//
130+
// See testHdPrman_ColorSpaceExcludeAOVs for a test
131+
// where Ci, a, and "pos" (source: __Pworld) results in
132+
// 6 displays seen by PxrColorTransformDisplayFilter:
133+
//
134+
// 0: "Ci"
135+
// 1: "a"
136+
// 2: "Ci"
137+
// 3: "a"
138+
// 4: "pos"
139+
// 5: "__Pworld"
140+
//
141+
if (auto sourceNameDs = varSchema.GetSourceName()) {
142+
uniqueAOVs.insert(
143+
sourceNameDs->GetTypedValue(0.0f) );
144+
}
124145
}
125146
}
126147
}

0 commit comments

Comments
 (0)