Parameters (Direct3D 9)

Parameters are effect variables.

Syntax

usage type ID [: semantic] [<annotation(s)>] [= expression];

Parameters can be read from and written to by the application with ID3DXEffect or ID3DXEffectCompiler.

Parameters can be referenced in functions and in techniques (specifically, in the right side of state assignments).

Item Description
usage
Scope of the parameter. See Usages and Literals (Direct3D 9).
type
Any valid Reference for HLSL type.
ID
A unique name.
semantic
A tag following identifier rules that typically indicates the usage of the parameter. Must be a particular type.
annotations
Zero or more pieces of user-specific information. May be any type. See Add Information to Effect Parameters with Annotations.
expression
Initializes the parameter's value. See Expressions (Direct3D 9).

 

Parameters can be initialized to any valid Reference for HLSL expression that reduces to a literal value.

Parameter values are not changed by the execution of state assignment or function calls.

Effect Format