Skip to content

Commit

Permalink
Fix unlit convert shaders
Browse files Browse the repository at this point in the history
They were considered lit in the shadergen.
  • Loading branch information
JGamache-autodesk committed Oct 25, 2024
1 parent 450192a commit d3310c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/MaterialXGenShader/ShaderNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d3310c6

Please sign in to comment.