AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
Commenting of #include directives is not respected by shader generation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 464
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing shader generation with a commented #include directive such as //#include "mx_math.glsl", then trace how include lines are detected and processed. Done means commented directives no longer include the referenced file and the resulting shader avoids the reported compile errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100