User guide
20 Args Files in Shaders
Args files provide hints about how parameters are presented in the user interface. One of their main uses is
describing how shader parameters are presented. Various aspects such as options for a shader parameter's widget,
conditional options, and help text can be modified interactively inside Katana’s UI. Further details, such as grouping
parameters into pages, are defined in .args files.
When loading a shader, Katana looks in the following directories for the associated .args file:
• An Args sub-directory of the shader directory
• A ../Args directory relative to the shader directory
• A ../doc directory relative to the shader directory
For backwards compatibility.
• Any Args sub-directories of $KATANA_RESOURCES
NOTE: Args files must be named to match the name of the shader they correspond to, rather than the
filename of the library that produced the shader.
The .args file for KatanaBasicPhong reads as follows:
<args format="1.0">
<param name="opacity"/>
<param name="Kd"/>
<param name="Kd_color" widget="color"/>
<param name="Ks"/>
<param name="Ks_color" widget="color"/>
<param name="SpecularExponent"/>
<param name="Ka"/>
<param name="Ka_color" widget="color"/>
</args>
The .args file shown above controls how the parameters of the KatanaBasicPhong shader appear in Parameters
tabs, as shown below: