Each shader may implement the following callback functions:
Init | Called the first time the shader is instantiated | |
InitUI | Called when the shader connections change, or one of the specified parameters is changed | |
Term | Enables the shader to clean up after itself | |
GetRequirements | Sets whether any of the requirements listed in the eXSI_RTS_RequirementType enum are required or not | |
GetAttributeList | Enables a shader to tell Softimage which attribute it needs in order to perform rendering | |
Execute | Main entry point for rendering the realtime shader |
You may prefix the name of the shader as identified in the SPDL file to the function name or any other string. For example, if the shader is named OGL13Shade
, then you could use OGL13Shade_Init
and OGL13Shade_Execute
, etc. If you choose not to use a prefix, the function name must begin with an underscore (for example, _Init
, _Execute
, etc.).
Each entry point gets a pointer to an instance of an IRTSExecutionState object. This object gives you access to scene data such as the current Camera object. You can also use the IRTSExecutionState object to access the legacy tagXSI_RTS_SystemParams by calling IRTSExecutionState::GetSystemParams. See the IRTSExecutionState reference page for more information.