The OSL shaders used in the above examples can be found here.
It is possible to create your own shaders using Open Shading Language. OSL shaders can be used to implement anything from simple texture patterns to full materials using closures. They can be placed in the plugin search path, and will then be automatically loaded like other types of shaders. Once loaded, they can be inspected, instantiated and linked in the same way as C++ shaders. The
osl node provides an alternate way to load OSL shaders, which can be used to write shader code for a specific material. When setting the shader name or code, the parameters from the OSL shader automatically appear on the node to be set or linked.
A limitation is that only one output parameter is supported at the moment.
shadernameName of the shader to load. This can be the name of the shader file with or without the .osl and .oso extensions to look up in the shader search paths, or a full file path.
codeA string containing the code of an OSL shader, embedded directly into the node instead of loaded from a separate file.