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

New noise functions #11

Open
stegu opened this issue Apr 7, 2022 · 2 comments
Open

New noise functions #11

stegu opened this issue Apr 7, 2022 · 2 comments

Comments

@stegu
Copy link

stegu commented Apr 7, 2022

You may want to have a look at the repo https://github.com/stegu/psrdnoise/ for a set of modern improved noise functions by me and Ian McEwan. These are both better and faster than the functions we published in ashima/webgl-noise, and they include code for computing the analytical derivative of the noise, which means that "flow noise" by Perlin and Neyret is now very easy to implement in 2D and 3D (the 3D version being an innovation of ours), and the "curl noise" function you include in your library is obsolete. Compared to finite differences, the analytical derivatives require only a small fraction of the work to compute.

Like the webgl-noise functions, the new functions are still compatible with WebGL 1.0 (no integer math) for maximum portability. Furthermore, I made a WGSL port for the upcoming WebGPU platform, and a GLSL version of 2D noise that works with "mediump". Most other noise functions have problems with mediump. Procedural texturing is really very hard to use with only mediump precision for all attributes and uniforms, but the noise function as such copes with 16-bit half-floats.

Incidentally, the patent on Perlin's original algorithm for Simplex Noise has now expired, so there is no need to mention it any longer. The patent claims were arguably applicable in part to the old webgl-noise functions, but not to the new functions, although that is now a moot point. I would even argue that the patent was issued in error by the USPO and would have been invalidated on a challenge or as a result of any actual litigation. Specifically, its primary claim (that simplex noise lacks grid artifacts and/or is visually isotropic) is demonstrably false, which invalidates all dependent claims and thereby the entire patent. Again, because the patent finally expired in January 2022, this is now moot.

@FarazzShaikh
Copy link
Owner

FarazzShaikh commented Apr 7, 2022

Hey! Thank you for taking the time. I appreciate the feedback!

I have been meaning to re-write this project with a better API and documentation for a quite a while now, I guess it’s finally time. Thank you for bringing the new functions to my attention, they sound like a big improvement. I will definitely include them in the rewrite. I have been playing around with WebGPU too and would love to have WebGPU exports in this library as well.

would be happy to include any more suggestions you may have.

PS: I hope using your functions in this library is alright with you.

@stegu
Copy link
Author

stegu commented Oct 11, 2022 via email

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