Closed 138paulmiller closed 5 years ago
To answer your question, I think inclusions should be allowed to happen before the shader directive, as it would make things easier and tidier.
Yeah.
At some point we should probably rewrite the parser completely to be a bit nicer (I wrote the original in fairly quickly and didn't pay that much attention to code quality).
And yeah, I think parsing includes before #shader's is best.
Everything ready for a merge now?
Shader Pipeline creation via file or source, requires a dirpath for include directives : close #116.
Question: Should all shader source require
#shader
directive to be parsed before the#include
directive? It might be useful to be able to parse some shaders as such:foo.shader
#include "foo.frag"
#include "foo.vert"
foo.vert
#shader vertex
...
foo.frag
#shader pixel
...
Might create an issue, if it doesn't seem pointless, else will move on to other issues.