?/TD>
Microsoft DirectX 9.0

Bias


Subtract 0.5 from all components.

Registers

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

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 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.


© 2002 Microsoft Corporation. All rights reserved.