ps_1_4 Source Register Modifiers for texld and texcrd
Microsoft DirectX 9.0 SDK Update (October 2004)

ps_1_4 Source Register Modifiers for texld and texcrd


Two pixel shader version 1_4 texture address instructions, texld and texcrd, have custom syntax. These instructions support their own set of source register modifiers, source register selectors, and destination-register write masks, as shown here.

Source Register Modifiers for texld and texcrd

These modifiers provide projective divide functionality by dividing the x and y values by either the z or w values.

Source register modifiers Description Syntax
_dz Divide x,y components by z register_dz
_db register_db
_dw Divide x,y components by w register_dw
_da register_da

Remarks

The _dz or _db modifier does the following:

x' = x/z ( x' = 1.0 if z == 0)
y' = y/z ( y' = 1.0 if z == 0)
z' is undefined
w' is undefined

The _dw or _da modifier does the following:

x' = x/w ( x' = 1.0 if w == 0)
y' = y/w ( y' = 1.0 if w == 0)
z' is undefined
w' is undefined


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.