Microsoft Directx 8.1 (pixel shader versions 1.0, 1.1, 1.2, 1.3, 1.4) |
source register_bias
Subtract 0.5 from all components.
Source register. For more about register types, see Registers.
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.
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.