description | ms.assetid | title | ms.topic | ms.date |
---|---|---|---|---|
Expressions are mathematical or logical statements that are used on the right hand side of an equals sign. There are many types of expressions. |
642aa188-5dd7-49fc-b6cc-845f8fc22530 |
Expressions (Direct3D 9) |
article |
05/31/2018 |
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 Reference
( variable ) or<variable >
-
Numeric Scalar
scalar
-
Numeric Expression
( numeric expression )
All standard numeric HLL expressions are supported here.
-
Constructor
type ( constructor arguments )
-
List of Initializers
{ 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.
-
OR Expression
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
NULL can only be assigned to a shader, sampler, or a texture object.
-
Assembly Block
asm { code }
PS Assembly Blocks must be assigned to the PIXELSHADER state.
VS Assembly Blocks must be assigned to the VERTEXSHADER state.
-
Sampler State Block
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.
-
Effect State State Block
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.
-
HLSL Compile
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.