SMOOTHSTEP(3G)

    .SH "NAME" smoothstep - perform Hermite interpolation between two values
    .SH "DECLARATION"

            .HP u genType smoothstep(genType edge0, genType edge1, genType x);

            .HP u genType smoothstep(float edge0, float edge1, genType x);

            .HP u genDType smoothstep(genDType edge0, genDType edge1, genDType x);

            .HP u genDType smoothstep(double edge0, double edge1, genDType x);

    .SH "PARAMETERS"

        .PP edge0

                    Specifies the value of the lower edge of the Hermite function.

            .RE
            .PP edge1

                        Specifies the value of the upper edge of the Hermite function.

                .RE
                .PP x

                            Specifies the source value for interpolation.

                    .RE

                .SH "DESCRIPTION"
                    .PP smoothstep performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. This is useful in cases where a threshold function with a smooth transition is desired. smoothstep is equivalent to:
                    .PP
                    genType t;  /* Or genDType t; */
                    t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
                    return t * t * (3.0 - 2.0 * t);

                    .PP Results are undefined if edge0 ≥ edge1.

                .SH "VERSION SUPPORT"
                    .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ OpenGL Shading Language Version T} T{ Function Name T}:T{ 1.10 T}:T{ 1.20 T}:T{ 1.30 T}:T{ 1.40 T}:T{ 1.50 T}:T{ 3.30 T}:T{ 4.00 T}:T{ 4.10 T}:T{ 4.20 T}:T{ 4.30 T}:T{ 4.40 T}:T{ 4.50 T} l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ smoothstep (genType) T}:T{ - T}:T{ - T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ smoothstep (genDType) T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}

                .SH "SEE ALSO"
                    .PP mix(), step()

                .SH "COPYRIGHT"
                    .PP Copyright © 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. https://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2011-2014 Khronos Group