-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add option to not remove \n for easier debugging. #440
Comments
|
hm, i thought it's not that option, because |
For most formats, newlines and indentation can be preserved in the source code of the surrounding language, but are not preserved at run-time, the shader source itself is fully compressed.
It's a bit confusing, I guess... When generating C/JS/nasm/Rust, there's currently no way to preserve newlines and indentation in the shader source itself. |
For every format option we could have a It shouldn't be needed though, since a shader may be easily loaded from file for testing purposes, and glslang can catch most errors at project build time. |
It can be loaded from file, but my engine has a whole build system around it, which involves shader_minifier, so it's a bit complicated. I'll end up generating the c strings myself, but at that point - it could be a feature of shader minifier. It does already exist to some extent. Glslang is a valid option... It fared pretty well in my vulkan engine. But it adds complexity to the project. |
or you could use an |
If new line characters are stripped, shader errors (on windows/nvidia) become very hard to track.
I propose an option
--no-remove-newline
, which would allow easier spotting of issues.The text was updated successfully, but these errors were encountered: