> '#include' : Could not process include directive for header name: ladybug.glsl
I'm not sure what to do with that error message. ladybug.glsl is in the same directory as the current shader. I also tried the path from the folder containing main.lua.
This thread implies that I need to use a shader compiler, but what's the point of the include directive if that's the case?
#include is not directly supported by love at the moment. It's not a native feature of GLSL either.
One option for you is to write a parser for your shaders to deal with #includes yourself, or a simpler (but less generic) option could be to manually concatenate the file contents you want together.
slime wrote: ↑Sun May 01, 2022 12:28 am
One option for you is to write a parser for your shaders to deal with #includes yourself
Thanks for the suggestion! It worked great and I've finally extracted my solution and posted it online: shaderscan. In addition to handling includes, it outputs filenames in errors and auto reloads shaders on save.