Skip to content

Commit

Permalink
Set Target Colorspace on context
Browse files Browse the repository at this point in the history
We found a Color Space diff in testUsdImagingGLMaterialXCustomNodes_customMaterial.
The issue is that target colorspace should be set on the generator context instead of the document.

Closes #3482

(Internal change: 2354861)
  • Loading branch information
ashwinbhat authored and pixar-oss committed Jan 29, 2025
1 parent 534b22c commit 479029c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pxr/imaging/hdSt/materialXFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ HdSt_GenMaterialXShader(
cms->loadLibrary(stdLibraries);
mxContext.getShaderGenerator().setColorManagementSystem(cms);

// Set the colorspace
// XXX: This is the equivalent of the default source colorSpace, which does
// not yet have a schema and is therefore not yet accessable here
mxDoc->setColorSpace("lin_rec709");
// Set the target colorspace
// XXX: This is equivalent to the scene referred color space, and is
// not yet accessible here
mxContext.getOptions().targetColorSpaceOverride = "lin_rec709";

// Add the Direct Light mtlx file to the mxDoc
mx::DocumentPtr lightDoc = mx::createDocument();
Expand Down

0 comments on commit 479029c

Please sign in to comment.