I am trying to understand Dot Product and how to use it.
I am trying to follow/re engineer a shader that I have found.
(Acid Jelly from either Shadertoy or Shaderific, I think).
The line of shader code is ‘uv /= dot(uv, uv);’.
So I comment that line out and I can see that line of code is really making this shader do what it does.
I did a little grey/ one color study sketch in 2D and I see we get black at 0, 0 and it gradients to white as we right and/or down. So you pass a vector as parameter1 and the same vector as parameter2 and you get a changing result. I have not done heavy math in decades and this changing result has me struggling to understand. I have researched Dot Product in Wikipedia and other sites but still not clear at all.
If anyone has some enlightenment then I would appreciate it.