forked from blender/blender
MaterialX: add color nodes #17
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
} // namespace blender::nodes::materialx
|
} // namespace blender::nodes::materialx
|
||||||
|
Loading…
Reference in New Issue
Block a user
color ^ gamma