This feature would add a new glsl file extension - ".glsl". These files can't themselves be used as shader sources (and should never define the main method).
The new macro would be used something like so:
#include "curves.glsl"
This would substitute the macro line with the contents of the named source file. Various useful functions can then be bundled with mgrl, both to simplify existing bundled shader programs as well as a convenience to authoring new ones.
[x] add .glsl extension
[x] macro substitution
[x] move repetitive bundled shader code into bundled glsl files
This feature would add a new glsl file extension - ".glsl". These files can't themselves be used as shader sources (and should never define the main method).
The new macro would be used something like so:
This would substitute the macro line with the contents of the named source file. Various useful functions can then be bundled with mgrl, both to simplify existing bundled shader programs as well as a convenience to authoring new ones.