ps_1_4 source register modifiers for texld, texcrd

Two pixel shader version 1_4 texture address instructions, texld - ps_1_4 and texcrd - ps, 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 Divide x,y components by z register_db
_dw Divide x,y components by w register_dw
_da Divide x,y components by w 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

Pixel Shader Source Register Modifiers