I'm new to OpenGL and GLSL, and bit confused about calling conventions of shader functions.
I'm trying to implement various procedural noise algorithms in GLSL. I'd like to have separate files for each noise and call these functions inside other fragment shaders.
Let say I have 2 files perlin.glsl and simplex.glsl.
perlin.glsl consists of pnoise2, pnoise3, pnoise4
simplex.glsl consists of snoise2, snoise3, snoise4
I have another fragment shader marble.frag which calls both snoise2, pnoise2 and has a main()
How do I call fragment shader functions inside other fragment shaders?
Is this considered a good practice?
Can you think of a better alternative?