The parameters defined in an effects (.cgfx or .fx) file dynamically generate user interfaces when loaded into the render tree. Every global variable that is not bound to SAS is automatically displayed in the shader's property editor unless specified otherwise.
User interfaces are defined in the effects file using annotations. An annotation is a list of variables and values denoted by angle brackets immediately following a declaration. The effects file format does not interpret the meaning of annotations in any way. Therefore, annotations make it possible to attach additional information to parameters for use by Softimage.
Specifically, annotations that define the UIWidget or SasUiControl variable are used to generate an appropriate user interface control that the artist can use for tweaking parameter values. You can specify a "Color" or "Slider" type of control. Use "None" when no user interface is required.
The texture image nodes required by the effects shader are automatically created and connected to the shader node if you defined a ResourceType for your texture samplers.
float SpecularPower < string UIWidget = "Slider"; string UIName = "Specular Power"; float UiMin = 1; float UiMax = 200; > = 20.0f;
float3 |
Defines sliders for the R,G,B color channels. |
float4 |
Defines sliders for the R,G,B,A color channels. |
float3 SpecularColor < string UIWidget = "Color"; string UIName = "Specular"; > = {1.0f, 1.0f, 1.0f};
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License