Expressions are mathematical or logical statements that are used on the right hand side of an equals sign. There are many types of expressions.
( variable ) or<variable >
scalar
( numeric expression )
All standard numeric HLL expressions are supported here.
type ( constructor arguments )
{ scalar value [, scalar value ... ] }
The scalars must be literal scalar values.
The number of initializers must be compatible with the variable (state) on the left hand side of the equals sign.
token [ | token ... ]
The tokens must be compatible with the variable (state) on the left hand side of the equals sign.
The tokens are not case sensitive.
NULL
NULL can only be assigned to a shader, sampler, or a texture object.
asm { code }
PS Assembly Blocks must be assigned to the PIXELSHADER state.
VS Assembly Blocks must be assigned to the VERTEXSHADER state.
sampler_state { [ state = expression ; [ state = ... ] ] }
Sampler state blocks are sequences of un-indexed sampler stage state or texture assignments.
Sampler state blocks must be assigned to the SAMPLER effect state.
stateblock_state { [ state [ [index] ] = expression; [ state [ [index] ] = ... ] ] }
State blocks are sequences of general state. State blocks can be nested, but cannot contain circular references.
State blocks must be assigned to the STATEBLOCK effect state.
compile target entrypoint ( [ arguments ] )
The vertex shader vs_m_n target indicates D3DVS_VERSION(m, n) vertex shader version. The pixel shader ps_m_n target indicates D3DPS_VERSION(m, n) pixel shader version.
Vertex shader high-level language compile expressions can only be assigned to the VERTEXSHADER effect state. Pixel shader high-level language compile expressions can only be assigned to the PIXELSHADER effect state.