If you create several custom nodes, it can be useful to create a loader that will load all of them from the same library ﬁle. It is also possible to create a metadata ﬁle with all the metadata information from all the shaders.
Two Simple Shaders
The first thing you need are the shaders you want to include; here are two very basic ones. Each node is defined in its own source code file, and both export their methods using the
When Arnold loads the shared, it will call the
node_loaderentry point several times, each time increasing the index i, until one of the calls returns
false. So for loading two shaders,
truefor values of i between 0 and 1 and set the corresponding shader data in
node, and return
falsefor all other values.
The commands to compile are similar to a single shader, just using more files.