2
$\begingroup$

I'm a total newbie to coding and recently got interested into generative art. This is my problem: I have to copy all of the functions I need (and there are a lot) in every single fragment file I'm working on. I'm wondering if there is a way to keep all the functions in a separate file(s) and import what I need, into the fragment file I'm working on. Thanks.

$\endgroup$
1
  • $\begingroup$ Depending on the framework/app, some GLSL implementations may support using #include to bring in code from another file. Can you tell us more about where/how you're using GLSL? Are you coding your own app, or using it within some engine, sandbox, etc.? $\endgroup$ Apr 23, 2022 at 21:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.