forked from blender/blender
Move the MaterialX export code into the existing shader node files #18
@ -259,8 +259,20 @@ static void sh_node_noise_build_multi_function(NodeMultiFunctionBuilder &builder
|
|||||||
|
|
||||||
NODE_SHADER_MATERIALX_BEGIN
|
NODE_SHADER_MATERIALX_BEGIN
|
||||||
{
|
{
|
||||||
/* TODO: Implement */
|
NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
|
||||||
return empty();
|
NodeItem detail = get_input_value("Detail", NodeItem::Type::Float);
|
||||||
|
NodeItem lacunarity = get_input_value("Lacunarity", NodeItem::Type::Float);
|
||||||
|
|
||||||
|
NodeItem position = create_node("position", NodeItem::Type::Vector3);
|
||||||
|
position = position * scale;
|
||||||
|
|
||||||
|
NodeItem res = create_node("fractal3d", NodeItem::Type::Color3);
|
||||||
|
res.set_input("position", position);
|
||||||
|
if (detail.value) {
|
||||||
|
res.set_input("octaves", val(int(detail.value->asA<float>())));
|
||||||
|
}
|
||||||
|
res.set_input("lacunarity", lacunarity);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
NODE_SHADER_MATERIALX_END
|
NODE_SHADER_MATERIALX_END
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user