Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function y=x is called "linear interpolation" #364

Open
singalen opened this issue Dec 27, 2021 · 2 comments
Open

Function y=x is called "linear interpolation" #364

singalen opened this issue Dec 27, 2021 · 2 comments

Comments

@singalen
Copy link

In chapter https://thebookofshaders.com/05/, y = st.x dependency is called "linear interpolation".

This is not the right term. Mapping from x to y is called a function, and y=x is one of the simplest examples of a linear function.

@singalen
Copy link
Author

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 of edge1 evaluate to 1, and values between edge0 and edge1 smoothly grow from 0 to 1.

Or outright give a mathematical definition like NVidia doc does:

  • Returns 0 if x < a < b or x > a > b
  • Returns 1 if x < b < a or x > b > a
  • Returns a value that smoothly grows in range [0,1], for the source values from [a,b]` range.

@RollsChris
Copy link

I think these sound reasonable.. maybe you could create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants