It would be nice to load the shader at compile time to a string, analyse the "main shader" string and if a special keyword like #include is in there use the following name to replace this line with another string aka a shader part.
This way I could ensure that input structs are always the same size and the guy who writes the shader also has to write a shader just once.
However, atm the structs are set in a *.glsl file and the shader-writer has to copy them manually.
It would be nice to load the shader at compile time to a string, analyse the "main shader" string and if a special keyword like
#include
is in there use the following name to replace this line with another string aka a shader part.This way I could ensure that input structs are always the same size and the guy who writes the shader also has to write a shader just once.
However, atm the structs are set in a
*.glsl
file and the shader-writer has to copy them manually.