Standard Annotations Reference
An annotation is metadata attached to a parameter that can be used by an effect to get additional information about a parameter's intended usage. Instead of creating naming guidelines for parameters, Microsoft has created a set of standard annotations. Parameters do not have to use semantics or annotations (although it's recommended that they do so, see Using Standard Semantics and Standard Annotations).
Generic Annotations
Name | Type | Description |
---|
Normalize | bool | The data should be normalized. |
---|
Object | string | Object type, which is one of the following values:
- Geometry
- Camera
- Frame
- Light
- RenderTarget
|
---|
Semantic | string | Reserved for future use. |
---|
SemanticType | string |
Can be Semantic = RenderColorTarget, which is one of the following values:
Can be Semantic = Attenuation, which is one of the following values:
|
---|
Space | string | Coordinate space.
|
---|
Units | string | Unit scale, which is one of the following values:
- Ms, sec, min, hour
- Mm, cm, m, km, inch, feet, yard, mile
- Rad, deg
- RGB, HIS, YUV, IA
- Quaternion
|
---|
Usage | string | Hint to the application.
string Usage = "Roughness";
|
---|
Texture Annotations
Name | Type | Description |
---|
Dimensions | float1, float2, float3 | Suggested dimension for a texture (width, height, depth). |
---|
Discardable | bool | Each texture is discardable. |
---|
Format | string | Texture format. The valid values for this come from D3DFORMAT. |
---|
Function | string | Function name. This also for procedural generation of values for a variable. |
---|
MIPLevels | int | Number of mip levels requested. Specify zero to automatically generate miplevels.
integer MIPLevels = 4;
|
---|
ResourceName | string | Resource name for objects, such as a filename for a texture. |
---|
ResourceType | string | Texture resource type, which can be one of the following:
|
---|
TargetPS, TargetVS | string | Shader compile target. |
---|
ViewportRatio | float | Suggested ratio for a texture width and height as compared to a viewport width and height. |
---|
UI Annotations
Name | Type | Description |
---|
UIHelp | string | Help string.
string UIHelp = "The diffuse color";
|
---|
UIMax | float | Maximum control value.
float4 UIMax = (1.0, 1.0, 1.0, 1.0);
|
---|
UIMin | float | Minimum control value.
float4 UIMin = (0.0, 0.0, 0.0, 0.0);
|
---|
UIName | string | Control name.
string UIName = "My Color";
|
---|
UIObject | object | Link to an object in an external application. The object is read only and the data extracted from the object is defined by the external application. |
---|
UIStep | float | Incremental step value when incrementing or decrementing a parameter.
Value = x ^ UIStep
|
---|
UIStepPower | float | Specular reflection power. |
---|
UIWidget | string | Usage type of a variable. This provides more specific usage information than the usage specified by a semantic. This value is a string value that can be, but is not limited to, one of the following values:
- Slider
- Spinner
- Color
- Grayscale (all components must be set to the same value)
- Numeric
- String
- Texture
- Direction
- Object (dependent on the object annotation)
- None - Do not display this annotation.
string UIWidget = "Grayscale";
|
---|