webgl-noise library

 from Red Blob Games
14 Feb 2021

I was going to use this library but the demos didn’t work on my Mac, and they didn’t work on my Linux machine either. It turns out other people were having similar issues:

On OS X, the GL paths are weird. On both OS X and Linux, the demos want glfw2 and the standard package is glfw3.

I decided to try porting it to JavaScript. After all, these are WebGL noise libraries!

The demo takes noisedemoMain.frag and runs it through the C preprocessor to insert noise3D.glsl into it. I guess in C this is easier than doing string processing in the code! I don’t know if the demo works with any of the other glsl files. I started out using the C demo code, but then ended up rewriting it with regl.js, then rewrote it to use WebGL directly.

webdemo/

I submitted this change to the author of the library, and it’s now live[5]!

I also found some other noise-related things for my bookmarks:

Email me , or tweet @redblobgames, or comment: