<s>
Smoothstep	B-Algorithm
is	O
a	O
family	O
of	O
sigmoid-like	B-Algorithm
interpolation	B-Algorithm
and	O
clamping	B-Algorithm
functions	O
commonly	O
used	O
in	O
computer	O
graphics	O
,	O
video	O
game	O
engines	O
,	O
and	O
machine	O
learning	O
.	O
</s>
<s>
The	O
gradient	O
of	O
the	O
smoothstep	B-Algorithm
function	O
is	O
zero	O
at	O
both	O
edges	O
.	O
</s>
<s>
This	O
is	O
convenient	O
for	O
creating	O
a	O
sequence	O
of	O
transitions	O
using	O
smoothstep	B-Algorithm
to	O
interpolate	O
each	O
segment	O
as	O
an	O
alternative	O
to	O
using	O
more	O
sophisticated	O
or	O
expensive	O
interpolation	B-Algorithm
techniques	O
.	O
</s>
<s>
In	O
HLSL	B-Language
and	O
GLSL	B-Language
,	O
smoothstep	B-Algorithm
implements	O
the	O
,	O
the	O
cubic	O
Hermite	O
interpolation	B-Algorithm
after	O
clamping	B-Algorithm
:	O
</s>
<s>
is	O
identical	O
to	O
the	O
clamping	B-Algorithm
function	I-Algorithm
:	O
</s>
<s>
The	O
characteristic	O
"	O
S	O
"	O
-shaped	O
sigmoid	B-Algorithm
curve	I-Algorithm
is	O
obtained	O
with	O
only	O
for	O
integers	O
n	O
≥	O
1	O
.	O
</s>
<s>
The	O
order	O
of	O
the	O
polynomial	O
in	O
the	O
general	O
smoothstep	B-Algorithm
is	O
2n	O
+	O
1	O
.	O
</s>
<s>
With	O
n	O
=	O
1	O
,	O
the	O
slopes	O
or	O
first	B-Algorithm
derivatives	I-Algorithm
of	O
the	O
smoothstep	B-Algorithm
are	O
equal	O
to	O
zero	O
at	O
the	O
left	O
and	O
right	O
edge	O
(	O
x	O
=	O
0	O
and	O
x	O
=	O
1	O
)	O
,	O
where	O
the	O
curve	O
is	O
appended	O
to	O
the	O
constant	O
or	O
saturated	B-Algorithm
levels	O
.	O
</s>
<s>
With	O
higher	O
integer	O
n	O
,	O
the	O
second	O
and	O
higher	O
derivatives	B-Algorithm
are	O
zero	O
at	O
the	O
edges	O
,	O
making	O
the	O
polynomial	O
functions	O
as	O
flat	O
as	O
possible	O
and	O
the	O
splice	O
to	O
the	O
limit	O
values	O
of	O
0	O
or	O
1	O
more	O
seamless	O
.	O
</s>
<s>
Ken	O
Perlin	O
suggested	O
an	O
improved	O
version	O
of	O
the	O
commonly	O
used	O
first-order	O
smoothstep	B-Algorithm
function	O
,	O
equivalent	O
to	O
the	O
second	O
order	O
of	O
its	O
general	O
form	O
.	O
</s>
<s>
It	O
has	O
zero	O
1st	O
-	O
and	O
2nd-order	O
derivatives	B-Algorithm
at	O
x	O
=	O
0	O
and	O
x	O
=	O
1	O
:	O
</s>
<s>
Starting	O
with	O
a	O
generic	O
third-order	O
polynomial	O
function	O
and	O
its	O
first	B-Algorithm
derivative	I-Algorithm
:	O
</s>
<s>
Applying	O
the	O
desired	O
values	O
for	O
the	O
first	B-Algorithm
derivative	I-Algorithm
of	O
the	O
function	O
at	O
both	O
endpoints	O
:	O
</s>
<s>
This	O
results	O
in	O
the	O
third-order	O
"	O
smoothstep	B-Algorithm
"	O
function	O
:	O
</s>
<s>
Starting	O
with	O
a	O
generic	O
fifth-order	O
polynomial	O
function	O
,	O
its	O
first	B-Algorithm
derivative	I-Algorithm
and	O
its	O
second	O
derivative	B-Algorithm
:	O
</s>
<s>
Applying	O
the	O
desired	O
values	O
for	O
the	O
first	B-Algorithm
derivative	I-Algorithm
of	O
the	O
function	O
at	O
both	O
endpoints	O
:	O
</s>
<s>
Applying	O
the	O
desired	O
values	O
for	O
the	O
second	O
derivative	B-Algorithm
of	O
the	O
function	O
at	O
both	O
endpoints	O
:	O
</s>
<s>
The	O
inverse	O
of	O
smoothstep( )	O
can	O
be	O
useful	O
when	O
doing	O
certain	O
operations	O
in	O
computer	O
graphics	O
when	O
its	O
effect	O
needs	O
to	O
be	O
reversed	O
or	O
compensated	O
for	O
.	O
</s>
<s>
In	O
GLSL	B-Language
:	O
</s>
