Open singalen opened 2 years ago
Another comment about "interpolation" term in https://thebookofshaders.com/05/.
The informal definition of smoothstep()
is quite confusing, given that no definition of interpolation
was given (and the term was so far encountered once in a wrong context).
Given a range of two numbers and a value, this function will interpolate the value between the defined range. The two first parameters are for the beginning and end of the transition, while the third is for the value to interpolate.
This left me confused. I would say something like:
values outside of
edge0
evaluate to 0, values outside ofedge1
evaluate to 1, and values betweenedge0
andedge1
smoothly grow from 0 to 1.
Or outright give a mathematical definition like NVidia doc does:
x < a < b
or x > a > b
x < b < a
or x > b > a
[0,1]
, for the source values from [a,b]` range. I think these sound reasonable.. maybe you could create a PR?
In chapter https://thebookofshaders.com/05/,
y = st.x
dependency is called "linear interpolation".This is not the right term. Mapping from
x
toy
is called afunction
, andy=x
is one of the simplest examples of alinear function
.