Adding Shaders

Folder Structure

Shader Files follow the same general rule as the XML nodes without the need to set the Category Tag into the XML 

since shaders are not allowed to be set into subcategories. So lighting shaders will fall into these various folders. 





Node Type:


To determine what kind of Node it is the autoloader will use the default tags that are found in the Mari XML files and place

them into types: Diffuse, Specular, Standalone shader

Example 1: 




Example 2:





Node Name in UI:

The name of the Node as it appears in Mari's UI is used from Mari's Default XML Attribute 



<DefaultName>My Shader</DefaultName> will Name the Node My Shader in the Mari UI.

If no <DefaultName> Tag is found <ID> Tag will be used and the node will still register, but an error printout will appear in the Python console

Cross Version Compatibility

The <ID> tag is a unique Name that allows Mari to identify the Node, regardless of the name

it has in the UI. The <ID></ID> should never change between Versions of the Node to allow Mari to

convert between Versions. 



Restricting Shaders to specific Mari Versions

You can restrict Nodes to load only in specific MARI Versions by using the

<MinMariVersion> and <MaxMariVersion> tags in the Node XML files.

The tags are optional. You can have just a <MinMariVersion> tag, just a <MaxMariVersion> one

or leave them out completely if not required.        


Restrict a Node to Mari 3.1 or higher:                 <MinMariVersion>30101000</MinMariVersion> 

Restrict a Node to Mari 3.0v3 or lower:         <MaxMariVersion>30003300</MaxMariVersion>