When I find some code online in a tutorial or article I can use it as I see fit and nobody sane would sue me for doing so.
There's a big difference between what the law says, and what actually happens in the real world. I was answering from a legal perspective, not a practicality perspective :wink:
There's a lot of instances of copyright infringement where no one gets sued.
There's also a lot of instances of lawsuits that occur even when the people getting sued have done nothing wrong :(
If you're going to derive a new work using an existing work as a base, without permission from the author, the law says that this is copyright infringement.
In practice you'll get away with it.
So can you take code and disregard law? Yes.
Should you? That's up to you to weigh the risks vs effort in complying with law.
AFAIK nobody can own algorithms or equations.
Sadly, that's where patents come in... You shouldn't be able to own an idea, but patent law means that people can... Which IMHO is immoral ;(
Ignoring patents though, you're right -- so:
* reading these shaders, understanding the algorithms intuitively, and then reproducing the algorithms yourself is 100% ok.
* doing a copy & paste, or a line-by-line translation from the source shader into your new shader is technically speaking, copyright infringement...