Standard Annotations Reference
Microsoft DirectX 9.0 SDK Update (October 2004)

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

NameTypeDescription
NormalizeboolThe data should be normalized.
Object stringObject type, which is one of the following values:
  • Geometry
  • Camera
  • Frame
  • Light
  • RenderTarget
SemanticstringReserved for future use.
SemanticTypestring Can be Semantic = RenderColorTarget, which is one of the following values:
  • Color
  • Normal
  • Depth
  • Stencil

Can be Semantic = Attenuation, which is one of the following values:

  • Distance
  • Spot
  • BoxX
  • BoxY

SpacestringCoordinate space.
UnitsstringUnit 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
UsagestringHint to the application.
string Usage = "Roughness";

Texture Annotations

NameTypeDescription
Dimensionsfloat1, float2, float3Suggested dimension for a texture (width, height, depth).
DiscardableboolEach texture is discardable.
FormatstringTexture format. The valid values for this come from D3DFORMAT.
FunctionstringFunction name. This also for procedural generation of values for a variable.
MIPLevelsintNumber of mip levels requested. Specify zero to automatically generate miplevels.
integer MIPLevels = 4;
ResourceNamestringResource name for objects, such as a filename for a texture.
ResourceTypestringTexture resource type, which can be one of the following:
  • 1D
  • 2D
  • 3D
  • cube
TargetPS, TargetVSstringShader compile target.
ViewportRatiofloatSuggested ratio for a texture width and height as compared to a viewport width and height.

UI Annotations

NameTypeDescription
UIHelpstringHelp string.
string UIHelp = "The diffuse color";
UIMaxfloatMaximum control value.
float4 UIMax = (1.0, 1.0, 1.0, 1.0);
UIMinfloatMinimum control value.
float4 UIMin = (0.0, 0.0, 0.0, 0.0);
UINamestringControl name.
string UIName = "My Color";
UIObjectobjectLink 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.
UIStepfloatIncremental step value when incrementing or decrementing a parameter.
Value = x ^ UIStep 
UIStepPowerfloatSpecular reflection power.
UIWidgetstringUsage 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";


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.