'\" t .\" Title: smoothstep .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "SMOOTHSTEP" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" smoothstep \- perform Hermite interpolation between two values .SH "DECLARATION" .HP \w'genType\ smoothstep('u .BI "genType smoothstep(genType\ " "edge0" ", genType\ " "edge1" ", genType\ " "x" ");" .HP \w'genType\ smoothstep('u .BI "genType smoothstep(float\ " "edge0" ", float\ " "edge1" ", genType\ " "x" ");" .HP \w'genDType\ smoothstep('u .BI "genDType smoothstep(genDType\ " "edge0" ", genDType\ " "edge1" ", genDType\ " "x" ");" .HP \w'genDType\ smoothstep('u .BI "genDType smoothstep(double\ " "edge0" ", double\ " "edge1" ", genDType\ " "x" ");" .SH "PARAMETERS" .PP \fIedge0\fR .RS 4 Specifies the value of the lower edge of the Hermite function\&. .RE .PP \fIedge1\fR .RS 4 Specifies the value of the upper edge of the Hermite function\&. .RE .PP \fIx\fR .RS 4 Specifies the source value for interpolation\&. .RE .SH "DESCRIPTION" .PP \fBsmoothstep\fR performs smooth Hermite interpolation between 0 and 1 when \fIedge0\fR < \fIx\fR < \fIedge1\fR\&. This is useful in cases where a threshold function with a smooth transition is desired\&. \fBsmoothstep\fR is equivalent to: .PP .if n \{\ .RS 4 .\} .nf genType t; /* Or genDType t; */ t = clamp((x \- edge0) / (edge1 \- edge0), 0\&.0, 1\&.0); return t * t * (3\&.0 \- 2\&.0 * t); .fi .if n \{\ .RE .\} .PP Results are undefined if \fIedge0\fR ≥ \fIedge1\fR\&. .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{ \fBOpenGL Shading Language Version\fR T} T{ \fBFunction Name\fR T}:T{ \fB1\&.10\fR T}:T{ \fB1\&.20\fR T}:T{ \fB1\&.30\fR T}:T{ \fB1\&.40\fR T}:T{ \fB1\&.50\fR T}:T{ \fB3\&.30\fR T}:T{ \fB4\&.00\fR T}:T{ \fB4\&.10\fR T}:T{ \fB4\&.20\fR T}:T{ \fB4\&.30\fR T}:T{ \fB4\&.40\fR T}:T{ \fB4\&.50\fR T} .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} .TE .sp 1 .SH "SEE ALSO" .PP \fBmix\fR(), \fBstep\fR() .SH "COPYRIGHT" .PP Copyright \(co 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2011-2014 Khronos Group .br