forked from blender/blender
MaterialX: Implement export of Input nodes #20
@ -26,6 +26,14 @@ static int gpu_shader_rgb(GPUMaterial *mat,
|
|||||||
return GPU_link(mat, "set_rgba", GPU_uniform(value), &out->link);
|
return GPU_link(mat, "set_rgba", GPU_uniform(value), &out->link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NODE_SHADER_MATERIALX_BEGIN
|
||||||
|
{
|
||||||
|
NodeItem res = create_node("constant", NodeItem::Type::Color4);
|
||||||
|
res.set_input("value", get_output_default("Color"));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
NODE_SHADER_MATERIALX_END
|
||||||
|
|
||||||
} // namespace blender::nodes::node_shader_rgb_cc
|
} // namespace blender::nodes::node_shader_rgb_cc
|
||||||
|
|
||||||
void register_node_type_sh_rgb()
|
void register_node_type_sh_rgb()
|
||||||
@ -37,6 +45,7 @@ void register_node_type_sh_rgb()
|
|||||||
sh_node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT);
|
sh_node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT);
|
||||||
ntype.declare = file_ns::node_declare;
|
ntype.declare = file_ns::node_declare;
|
||||||
ntype.gpu_fn = file_ns::gpu_shader_rgb;
|
ntype.gpu_fn = file_ns::gpu_shader_rgb;
|
||||||
|
ntype.materialx_fn = file_ns::node_shader_materialx;
|
||||||
|
|
||||||
nodeRegisterType(&ntype);
|
nodeRegisterType(&ntype);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user