Skip to content

Commit

Permalink
Fix image file color space for the OSL generator
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienHerubel committed Dec 4, 2024
1 parent 89ab0ff commit 1264386
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/MaterialXGenShader/ShaderGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ void ShaderGraph::applyInputTransforms(ConstNodePtr node, ShaderNodePtr shaderNo
}
}

ShaderInput* shaderInput = shaderNode->getInput(input->getName());
shaderInput->setColorSpace(sourceColorSpace);
ShaderOutput* shaderOutput = shaderNode->getOutput();
populateColorTransformMap(colorManagementSystem, shaderOutput, sourceColorSpace, targetColorSpace, false);
populateUnitTransformMap(unitSystem, shaderOutput, input, targetDistanceUnit, false);
Expand Down

0 comments on commit 1264386

Please sign in to comment.