-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to not strip spaces from macros #146
Comments
I've meanwhile found out that Unreal also doesn't like multiple declarations on the same line, although it is valid HLSL. Good:
Bad: So, in this case, it would more sense an alternative to the //[ approach, that did not touch that part at all. I'm not familiar with F#, but if you can give me an overall idea on what I would need to do then I can give it a try. |
Can you clarify your use-case? Unreal is usually quite big; are you using the tool just for obfuscating your shader code? |
Exactly. I'm trying to minify some HLSL shader code from Unreal. I'm using the following flags It appears that Unreal has a very picky parser/compiler, so something like the "verbatim" operator but that didn't modify the text would work. |
I was able to hardcode the Minifier for the things that I needed without implementing a new "verbatim" operator. Feel free to close this issue if its use-case is out of scope for the intended use. Thanks. |
Thanks for the feedback. We could have more flags to let you control more precisely the optimizations we apply. I'll let this issue open. If anyone else hits the problem, please comment. |
Hello,
I'm working with Unreal Engine (HLSL) and I noticed that it doesn't like #include with no spaces before the path.
Good:
#include "/Engine/Private/Common.ush"
Bad:
#include"/Engine/Private/Common.ush"
It refuses to compile the shaders, saying that it cannot resolve these paths.
I tried to use //[ and //] but it still strips spaces. So, currently, I need to have an extra build step to add an additional space after every #include.
Would it be possible to have a separate option to ignore pre-processor directives, or a different //[ combination that keeps the code-as-is (spaces included) ?
Thanks.
The text was updated successfully, but these errors were encountered: