Custom Shaders

Modular Shaders

Versions of Mari prior to the 2.0v1 release provided Python API hooks to register custom "modular shaders." However, the modular shader system has since been deprecated in favor of a more flexible node-graph-based system.

Custom Shaders and Layers

A custom shader API for Mari’s node-graph-based system exists to give you the ability to write and register your own shaders. Mari renders a scene in the canvas using its extensible shader system, based on a node graph. Internally, within Mari, shaders and layers are in the form of nodes. The custom shaders and layers can then be added by supplying XML files to Mari, defining custom shaders and layers in the form of nodes. Once the node definition has been written in an .xml file, it can be registered to Mari using the Python API.

The Custom Shader API that is built into Mari can be accessed by navigating to Help > SDK > Custom Shader API. Additionally, you can read more on the Python and C API documentation by navigating to Python > Documentation and Help > SDK > C API > Documentation on the Mari menu bar.

If you have any questions or difficulties with writing or registering custom shaders, please contact Customer Support directly through the Support Portal at the following address: https://support.foundry.com.