MaterialX: add color nodes #17

Merged
Bogdan Nagirniak merged 10 commits from matx-add-color-nodes into matx-export-material 2023-09-11 18:57:06 +02:00
Showing only changes of commit 950f2b2006 - Show all commits

View File

@ -8,13 +8,10 @@ namespace blender::nodes::materialx {
NodeItem GammaNodeParser::compute() NodeItem GammaNodeParser::compute()
{ {
NodeItem color = get_input_value("Color", NodeItem::Type::Color3); NodeItem color = get_input_value("Color", NodeItem::Type::Color4);
NodeItem gamma = get_input_value("Gamma", NodeItem::Type::Float); NodeItem gamma = get_input_value("Gamma", NodeItem::Type::Float);
NodeItem res = create_node("power", NodeItem::Type::Color3); return color ^ gamma;
res.set_input("in1", color);
res.set_input("in2", gamma);
return res;
} }
Review

color ^ gamma

color ^ gamma
} // namespace blender::nodes::materialx } // namespace blender::nodes::materialx