smoothstep
Description
Smooth step (Hermite interpolation).
Signature
T smoothstep<T>( T min, T max, T x) where T : __BuiltinFloatingPointType; vector<T, N> smoothstep<T, N:int>( vector<T, N> min, vector<T, N> max, vector<T, N> x) where T : __BuiltinFloatingPointType; matrix<T, N, M> smoothstep<T, N:int, M:int>( matrix<T, N, M> min, matrix<T, N, M> max, matrix<T, N, M> x) where T : __BuiltinFloatingPointType;
Generic Parameters
T: __BuiltinFloatingPointType
N : int
M : int
Parameters
min : T
The lower edge of the interpolation range.
max : T
The upper edge of the interpolation range.
x : T
The value to interpolate.
min : vector<T, N>
The lower edge of the interpolation range.
max : vector<T, N>
The upper edge of the interpolation range.
x : vector<T, N>
The value to interpolate.
min : matrix<T, N, M>
The lower edge of the interpolation range.
max : matrix<T, N, M>
The upper edge of the interpolation range.
x : matrix<T, N, M>
The value to interpolate.
Return value
0 if x is less than min, 1 if x is greater than max, and a smooth interpolation between 0 and 1 otherwise.
Availability and Requirements
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
metal
Available in all stages.
wgsl
Available in all stages.
spirv
Available in all stages.