In the render tree, you can hook up shaders together and set their values to create an effect. Once you have things set up as you like, you can then create a compound that contains all of these shaders, just as you can with nodes in the ICE tree.
Shader compounds allow you to create an effect and save it in one container, then use it in different scenes or share it with other users. You can expose only the parameters of each shader that you want others to see and adjust.
You can create a shader compound containing any type of shader. The compound can contain many shaders connected together, or just one shader, if you like. For example, you could put a single, large shader into a compound and then expose only a handful of necessary parameters that often need to be set.
There are some shader compounds available in the render tree that you can use and examine to get started, such as in the Particle group for more information. Then follow the steps in Creating a Shader Compound to create your own shader compound. Creating a shader compound is very similar to the process for creating ICE compounds.
In the image below, a simple shader compound is opened up for editing.
Shader compounds are very similar to ICE compounds, so most information about ICE compounds also applies to shader compounds — see Building ICE Compounds.
Here are the main differences:
Shader compounds have two names: the class name and the instance name. Changing one does not change the other. See Creating a Shader Compound.
The instance name appears as a label on the node in the render tree, in the node's property editor, and in the Instance column of the shader version manager. This is used when there are multiple versions of the shader compound available in the scene.
Shader compound nodes do not display an asterisk when you modify them.
Shader compounds do not require a Pass Through node to share an exposed input port.
When editing a shader compound, you can set either the Name or Display Name — see Editing the Shader Compound's Exposed Port Properties.
You can define how a port appears on the node in the render tree and in the node's property editor — see Editing the Shader Compound's Exposed Port Properties.
Because shaders do not allow an arbitrary number of connections, you cannot define multi-instance ports.
You cannot define a picking string for exposed ports or a construction mode for shader compounds. The ApplyICEOp command does not apply to shader compounds.
You can use PPG Logic to write scripts for execution and define the layout for the shader compound's property editor - see Editing Shader Compound Properties.
You can make shader compounds uneditable — see Editing Shader Compound Properties.
You cannot export shader compounds as private, and they do not store the display state of connections (because you cannot display the values of connections in the render tree).
Versioning shader compounds is a little different - see Versioning Shader Compounds for more information.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License