force include file
Hello,
I haven't found a way to force an include file to be included when compiling with dxc. Is there a way to do that? I expected that there would be an -include <filename> flag when invoking dxc. If there is no way, I suppose this would be a feature request. Apologies if I missed something.
Thanks, Janos
Could you include the file with #include in the main source file?
Hi, I can do that manually, of course. But it would be neat if I could also have this compiler flag and not manually include the source file myself.
For example, I have a project that has shaders written in an other language, and I want to compile all of them while also inserting a common header that redefines certain keywords to their HLSL equivalent.
The project has a lot of shaders without any includes at all, so I can't just insert this conversion header to a central header. It is also not a requirement to have a central header included in all shaders, to keep the shader authoring workflow as-is and simplistic.
Hello,
I'm bringing up this issue again because I'm interested in this addition for the same reasons as Janos:
- Shaders written by a third-party entity
- There is no include-by-all header to inject my stuff
Thanks, Raffaele