Microsoft DirectX 8.0 (C++) |
The following table list shows the proper syntax for constant values and a sample.
Type | Syntax | |
---|---|---|
DWORD |
#0x# |
545731530xff12a1fa |
FLOAT |
#f#.f .#f #.#f |
5f5.f .4f 4.5f |
VECTOR |
(float)(float, float) (float, float, float) (float, float, float, float) |
( 4.5f )( 4.5f, 1.0f ) ( 4.5f, 1.0f, 2.0f ) ( 4.5f, 1.0f, 2.0f, 3.4f ) |
MATRIX |
[ float, float, float, float,float, float, float, float, float, float, float, float, float, float, float, float ] |
[ 1.0f, 0.0f, 0.0f, 0.0f,0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f ] |
VERTEXSHADER |
DECL { ... } DECL { ... }, ASM { ... } |
decl{ stream 0; float v0[3]; float v3[3]; ubyte v5[4]; float v7[2]; } decl { stream 0; float v0[3]; float v3[3]; ubyte v5[4]; float v7[2]; } asm { vs.1.0 mov oPos, v0 } |
PIXELSHADER |
ASM { ... } |
asm{ vs.1.0 mov oPos, v0 } |
For information on the layout of the DECL syntax, see Vertex Shader Declaration Syntax.
For information on the layout of the ASM syntax, see Pixel Shader Assembler Reference.