FastLiteNoise ported to GLSL

Hi,
I rewrote C implementation of FastLiteNoise into GLSL. As far as I am aware it hasn’t been done before and I would like to share with you in case someone is curious. I needed mostly 3d variant and it seems to work in real time scenarios with no big hiccups. In fact, is quite fast. I hasn’t tested 2d, but it is included and doesn’t make any harm to the rest of the code. If someone needs it as it is, just grab it, but if someone fancy to review it and give suggestions, find a bug, even better. I haven’t created PR with GLSL code to upstream repo yet but I should do it in forthcoming days. Any way here a link the port with a demo

Hi @sidec ! Nice work :slight_smile:

orx used to have noise shaders but they got lost when migrating to v0.4.0. I can imagine they will be brought back. Do they provide similar features? I haven’t checked.

Cheers!

my bad, I didn’t check the source for orx-noise and assumed that there were only cpu/kotlin noise implementations. Luckly, from what I can see, FastNoiseLite doesn’t overlap. It is based on lookup tables, has fractal noises, some domain warps, both 2d and 3d.

Even if you had checked it would have been hard to notice that many months ago they were there :slight_smile:

Happy to hear there’s not much overlap! I’ll try figure out how to bring the old ones back and then maybe the ones you ported can live next to them :slight_smile:

that’s interesting. do you have any idea how to add them to orx? any thoughts on api design? some builder functions to create easily colorbuffers, using glsl phrases as dependency or keep thing tiny? Obviously it was me who went through glsl stuff, so I might be helpful in wrapping things around. it might be part of orx-noise or new library orx-fastnoiselite-gpu or whatever name it.

So the way those shaders Iinked above where used was via Filter. A list was declared in this file orx/NoiseFilters.kt at 579ddf9bb55fe133c600751fc2cd82a8d4e24459 · openrndr/orx · GitHub

You can read about filters at Filters and post processing - OPENRNDR GUIDE and Filters and post processing - OPENRNDR GUIDE

See the Checkers filter, as I think it’s similar in that the noise ones don’t use an input, just produce an output.

These used to work, but when OPENRNDR was made multiplatform (so you can output Java bytecode to run on desktop, or JavaScript programs to run on the browser) those files fell through the cracks. You can see that the file structure changed from here to here, so to bring the files back is maybe not as simple as undeleting the files and placing them where they used to be.

Making it work in the JVM version shouldn’t be hard. I don’t know though what would be the approach to load shader files in JS. One place to look for that is in the openrndr repo, as the core does use basic shaders somehow in the JavaScript version already.

That’s what I can say for now :slight_smile:

I haven’t played with OPENRNDR for JS yet. I will have a look at JS template for OPENRNDR programs. It looks like orx-fx is available for this platform any way, so I guess it should work in this case as well.

I needed noise shaders too so for now I did this

The demo I created produces an animated version of this

I’ll post again when it’s merged (or modified and merged).

1 Like


Now with better GUI support and more demos.

1 Like