![]() |
![]() |
Computes the sign of x. Returns -1 if x is less than 0, 0 if x equals 0, and 1 if x is greater than zero.
ret sign(x) |
---|
Where:
Name | In/Out | Template Type | Component Type | Size |
---|---|---|---|---|
x | in | scalar, vector, or matrix | float, int | any |
ret | out | same as input x | int | same dimension(s) as input x |
This intrinsic function is supported in the following (or above) shader versions:
Vertex Shader | Pixel Shader |
---|---|
vs_1_1 | ps_1_4 |