GentenStudios / QuartzEngine

Nolonger used, see Phoenix repo
BSD 3-Clause "New" or "Revised" License
34 stars 10 forks source link

close #116 #134

Closed 138paulmiller closed 5 years ago

138paulmiller commented 5 years ago

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.

vyomfadia commented 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.

DontBelieveMe commented 5 years ago

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.

vyomfadia commented 5 years ago

Everything ready for a merge now?