Rechercher une page de manuel
step.3Cg
Langue: en
Version: 342879 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
NAME
step - implement a step function returning either zero or oneSYNOPSIS
float step(float a, float x); float1 step(float1 a, float1 x); float2 step(float2 a, float2 x); float3 step(float3 a, float3 x); float4 step(float4 a, float4 x);
half step(half a, half x); half1 step(half1 a, half1 x); half2 step(half2 a, half2 x); half3 step(half3 a, half3 x); half4 step(half4 a, half4 x);
fixed step(fixed a, fixed x); fixed1 step(fixed1 a, fixed1 x); fixed2 step(fixed2 a, fixed2 x); fixed3 step(fixed3 a, fixed3 x); fixed4 step(fixed4 a, fixed4 x);
PARAMETERS
- a
- Scalar or vector reference value.
- x
- Scalar or vector.
DESCRIPTION
Implements a step function returning one for each component of x that is greater than or equal to the corresponding component in the reference vector a, and zero otherwise.REFERENCE IMPLEMENTATION
step for float3 vectors could be implemented this way:float3 step(float3 a, float3 x) { return x >= a; }
PROFILE SUPPORT
step is supported in all profiles.Support in the fp20 is limited.
SEE ALSO
max, min, saturate, smoothstepContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre