From d3310c691730a6609eda994108a1ee5b869d5541 Mon Sep 17 00:00:00 2001 From: JGamache-Autodesk Date: Fri, 25 Oct 2024 17:49:59 -0400 Subject: [PATCH] Fix unlit convert shaders They were considered lit in the shadergen. --- source/MaterialXGenShader/ShaderNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/MaterialXGenShader/ShaderNode.cpp b/source/MaterialXGenShader/ShaderNode.cpp index 6e951b06e6..adcf71566b 100644 --- a/source/MaterialXGenShader/ShaderNode.cpp +++ b/source/MaterialXGenShader/ShaderNode.cpp @@ -235,7 +235,8 @@ ShaderNodePtr ShaderNode::create(const ShaderGraph* parent, const string& name, } else if (*primaryOutput->getType() == *Type::SURFACESHADER) { - if (nodeDefName == "ND_surface_unlit") + if (nodeDefName == "ND_surface_unlit" || + (stringStartsWith(nodeDefName, "ND_convert_") && stringEndsWith(nodeDefName, "_surfaceshader"))) { newNode->_classification = Classification::SHADER | Classification::SURFACE | Classification::UNLIT; }