Source Register Bias
Microsoft DirectX 9.0 SDK Update (October 2004)

Source Register Bias


Subtract 0.5 from all components.

Registers

Source register. For more about register types, see ps_1_X Registers.

Remarks

The contents of the register are not changed. The modifier is applied only to the data read from the register. The bias is applied to all four color channels (RGBA) as follows:

output = (input - 0.5)

The effect is to modify data that was in the range 0 to 1 to be in the range -0.5 to 0.5. Applying bias to data outside this range may produce undefined results.

Note  This modifier is mutually exclusive with Source Register Invert, so it cannot be applied to the same register.

This modifier is for use with the arithmetic instructions.

Example

This example performs the same operation as D3DTOP_ADDSIGNED in Microsoft DirectX 6.0 and 7.0 multiple texture syntax.

add r0, r0, t0_bias; Shift down by 0.5.


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