Is it possible to share GLSL functions across multiple shaders?

Matteo Marson's icon

Hey everyone!
I'm trying to write some functions in separate files to be included in other shaders.
My final goal is to have a set of functions I can easily recall from any shader, without having to re-write everything every time and keeping the code more concise and hopefully faster to write.
I tried playing around with '#include' and '#extension GL_ARB_shading_language_include : require', but, as far as I understood, things are not that straightforward.

Do know how to achieve such a thing?
Thanks for your help!

Federico-AmazingMaxStuff's icon

I know Matteo you already found that out, but for anyone reading this with the same question:

check the "JXS Includes" examples in the GL3 package launcher.