Skip to content
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

Commenting of #include directives is not respected by shader generation #2097

Open
ld-kerley opened this issue Oct 30, 2024 · 1 comment
Open

Comments

@ld-kerley
Copy link
Contributor

While helping Masuo get the hex tiling PR working in MSL, I spent a long time being confused....

Commenting out #include lines does not stop them from being included.

//#include "mx_math.glsl"

The mx_math.glsl file was still being included, causing compile errors.

In this case we don't actually need to include this file, but in general we need shader generation to be robust, as its a bit of a blackbox for shader developers.

@jstone-lucasfilm jstone-lucasfilm changed the title #include handling broken in Shader Generation Commenting of #include directives is not respected by shader generation Oct 30, 2024
@jstone-lucasfilm
Copy link
Member

Good catch, @ld-kerley and @msuzuki-nvidia, and I believe that logic is currently implemented here in the shader generation system:

const string& INCLUDE = _syntax->getIncludeStatement();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants