?/TD> |
Microsoft DirectX 9.0 |
Computes the sign of the input.
sgn dst, src0, src1, src2 |
---|
where
Vertex shader versions | 1_1 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
---|---|---|---|---|---|---|
sgn | x | x | x | x | x |
This instruction works as shown below.
for each component in src0 { if (src0.component < 0) dest.component = -1; else if (src0.component == 0) dest.component = 0; else dest.component = 1; }
This is a macro instruction, which takes three instruction slots.
src1, and src2 should be different temporary registers.
Minimum operating system | Windows 98 |
---|