From 1264386464f51415b224d8b33f7510beb0494fb4 Mon Sep 17 00:00:00 2001 From: Adrien Herubel Date: Wed, 4 Dec 2024 15:44:55 +0000 Subject: [PATCH] Fix image file color space for the OSL generator --- source/MaterialXGenShader/ShaderGraph.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/MaterialXGenShader/ShaderGraph.cpp b/source/MaterialXGenShader/ShaderGraph.cpp index b95a9471e9..c2d7375577 100644 --- a/source/MaterialXGenShader/ShaderGraph.cpp +++ b/source/MaterialXGenShader/ShaderGraph.cpp @@ -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);