# FastLiteNoise ported to GLSL

**URL:** <https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403>\
**Category:** Libraries and extensions\
**Created:** [August 2, 2022, 2:47pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403 "2022-08-02T14:47:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidec](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@sidec](https://openrndr.discourse.group/u/sidec)\
**Post date:** [August 2, 2022, 2:47pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/1 "2022-08-02T14:47:25Z")

</div>

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](https://github.com/sidec/openrndr-fastnoiselite-glsl-demo)

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [August 3, 2022, 8:43pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/2 "2022-08-03T20:43:07Z")

</div>

Hi @sidec ! Nice work 🙂

orx used to have [noise shaders](https://github.com/openrndr/orx/tree/579ddf9bb55fe133c600751fc2cd82a8d4e24459/orx-noise/src/main/resources/org/openrndr/extra/noise) 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!

---

<div class="post-metadata">

**Author:** ![sidec](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@sidec](https://openrndr.discourse.group/u/sidec)\
**Post date:** [August 4, 2022, 6:51am UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/3 "2022-08-04T06:51:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [August 4, 2022, 9:26am UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/4 "2022-08-04T09:26:36Z")

</div>

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

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 🙂

---

<div class="post-metadata">

**Author:** ![sidec](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@sidec](https://openrndr.discourse.group/u/sidec)\
**Post date:** [August 5, 2022, 3:59pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/5 "2022-08-05T15:59:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [August 8, 2022, 2:23pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/6 "2022-08-08T14:23:12Z")

</div>

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](https://github.com/openrndr/orx/blob/579ddf9bb55fe133c600751fc2cd82a8d4e24459/orx-noise/src/main/kotlin/filters/NoiseFilters.kt)

You can read about filters at [Filters and post processing - OPENRNDR GUIDE](https://guide.openrndr.org/advancedDrawing/filtersAndPostProcessing.html) and [Filters and post processing - OPENRNDR GUIDE](https://guide.openrndr.org/advancedDrawing/filtersAndPostProcessing.html)

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](https://github.com/openrndr/orx/tree/579ddf9bb55fe133c600751fc2cd82a8d4e24459/orx-noise/src) to [here](https://github.com/openrndr/orx/tree/master/orx-noise/src), 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 🙂

---

<div class="post-metadata">

**Author:** ![sidec](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@sidec](https://openrndr.discourse.group/u/sidec)\
**Post date:** [August 10, 2022, 3:11pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/7 "2022-08-10T15:11:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [September 19, 2022, 5:42pm UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/8 "2022-09-19T17:42:27Z")

</div>

I needed noise shaders too so for now I did this

> <https://github.com/openrndr/orx/pull/277>
>
> See https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403
> 
> I inl…ined the shaders because loading from a URL wouldn't work well in JS. I didn't do any testing on JS though.

The demo I created produces an animated version of this

 ![image](https://global.discourse-cdn.com/free1/uploads/openrndr/original/1X/e9ea55f94f4e78d1c07b33a04342e7e8408981b8.jpeg)

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

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [September 21, 2022, 10:37am UTC](https://openrndr.discourse.group/t/fastlitenoise-ported-to-glsl/403/9 "2022-09-21T10:37:36Z")

</div>

![noise-gui](https://global.discourse-cdn.com/free1/uploads/openrndr/original/1X/457c0320b8c024aaf40d11a47d436ac22bb00a6f.png)  
Now with better GUI support and more demos.
