?/TD>
Microsoft DirectX 9.0

dcl_usage (Vertex Shader)


The various types of output registers have been collapsed into 12 o (output) registers (2 for color, 8 for texture, 1 for position, and 1 for fog and point size). These can be used for anything the user wants to interpolate for the pixel shader: texture coordinates, colors, fog, etc.

Output declarations are introduced, whereby semantics are assigned to each register. Old oPos and oPts are replaced by declaring an o register with a position or pointsize semantic, further described here.

There are 12 "out" registers. Ten have 4-components (xyzw) (any 10, not necessarily o0 to o9), another one must be declared as position (all 4-components), and optionally one more can be a scalar point size.

Syntax

The syntax for declaring outputs (o registers) is similar to the declarations for the inputs:

dcl_semantics o[.write_mask]

Where:

Remarks

Vertex shader versions3_03_sw
dcl_usagexx

All dcl_usage instructions must appear before the first executable instruction.

Declaration Examples

vs_3_0
dcl_color4     o3.x    // color4 is a semantic name.
dcl_texcoord3  o3.yz   // Different semantics can be packed into one register.
dcl_fog        o3.w 
dcl_tangent	   o4.xyz
dcl_positiont  o7.xyzw // positiont must be declared to some unique register 
                       //   in a vertex shader, with all 4 components.

dcl_psize	   o6      // Pointsize cannot have a mask 
                       //   (that is, mask is full .xyzw) ->
                       // This is an implied scalar register. 
                       // No other semantics can be assigned to any components
                       //   of this register.
                       // If pointsize declaration is not used (typical),
                       //   only 11 "out" registers are available, not 12.
                       // Pixel shaders cannot see this value.

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.