?/TD>
Microsoft DirectX 9.0

dcl_usage (Pixel Shader)


Declare the association between a vertex shader outputs and pixel shader inputs.

Syntax

dcl_semantics [_centroid] dest[.write_mask]

Where:

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
dcl_usagexx

All dcl_usage instructions must appear before the first executable instruction.

Declaration Examples

ps_3_0

; declaring inputs
dcl_normal      v0.xyz
dcl_blendweight v0.w ; Must be same reg# as normal, matching vshader packing.
dcl_texcoord1   v1.y ; Mask can be any subset of mask from vshader semantic.
dcl_texcoord0   v1.zw; Has to be same reg# as texcoord1, to match vshader.

; declaring samplers
dcl_2d s0
dcl_2d s1

def c0, 0, 0, 0, 0

mov r0.x, v1.y ; texcoord1
mov r0.y, c0
texld r0, r0, s0

texld r1, v1.zw, s1
...
(output regs in ps_3_0 are same as ps_2_0: oC0-oC3, oDepth)
Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.