Shader definitions can be instantiated with the CreateShaderFromProgID command and connected with the SIConnectShaderToCnxPoint command. The ShaderDef.ProgID or ShaderDef::GetProgID uniquely identifies the shader definition in Softimage using four components:
"ParserName.ClassName.MajorVersion.MinorVersion"
Parser Name—This is the name of the parser or plug-in that implemented the shader definition. Depending on how the shader definition was created, the parser name comes from one of the following sources:
Shader Definition Source |
Parser Name |
Description |
||
---|---|---|---|---|
Softimage native shader definitions built from SPDL files |
Softimage |
Name of native SPDL parser. For example, the Phong's ProgID is "Softimage.material-phong.1.0" and the Cloud texture's is "Softimage.txt3d-cloud.1.0". |
||
Softimage-provided Realtime shader definitions |
CgFXParser |
Name of parser for .cgfx files provided by Softimage. For example, the ProgID of the shader definition generated from the ThinFilm.cgfx file is "CgFXParser.ThinFilm.1.0". |
HLSLParser |
Name of parser for .fx files provided by Softimage. For example, the ProgID of the shader definition generated from the cage.fx file is "HLSLParser.cage.1.0". |
Shader definitions built from a custom shader definition plug-in |
<plug-in_name> |
Name used to register the plug-in via SIObject.Name or SIObject::PutName (in the XSLLoadPlugin callback). For example, the ProgID of the MyShaderDefName shader definition registered in the MyPluginName plug-in is "MyPluginName.MyShaderDefName.1.5". |
||
Shader definitions built from custom file formats parsed by a custom shader parser plug-in. |
<parser_name> |
Name used to register the shader parser via PluginRegistrar.RegisterShaderLanguageParser or PluginRegistrar::RegisterShaderLanguageParser (in the XSILoadPlugin callback). For example, the ProgID of the shader definition read from a parseable file and created in the ParseInfo callback is "MyParserName.MyDefParsedFromFile.2.0". |
Class Name—For shader definition plug-ins, this is the name used to register the shader definition via PluginRegistrar.RegisterShader or PluginRegistrar::RegisterShader (in the XSLLoadPlugin callback).
Major Version Number—This is the major portion of this shader definition's version number. For example, 2 is the major portion of version 2.6.
Minor Version Number—This is the minor portion of this shader definition's version number. For example, 6 is the minor portion of version 2.6.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License