Stricter check for eliding for Shader Optimization#2754
Merged
jstone-lucasfilm merged 3 commits intoAcademySoftwareFoundation:mainfrom Jan 30, 2026
Merged
Conversation
Member
jstone-lucasfilm
left a comment
There was a problem hiding this comment.
This looks like a good improvement, thanks @bowald, and I had just a few minor notes for clarity.
Member
There was a problem hiding this comment.
Let's just inline these two tests, rather than creating an intermediate constant, as I believe that will read more clearly.
Member
There was a problem hiding this comment.
Perhaps "Constant node doesn't follow expected interface, cannot elide"?
Contributor
Author
There was a problem hiding this comment.
hehe, I need to include a spell checker in my IDE. Thanks for addressing this.
Member
There was a problem hiding this comment.
Perhaps "Dot note doesn't follow expected interface, cannot elide", matching the comment above?
jstone-lucasfilm
approved these changes
Jan 30, 2026
Member
jstone-lucasfilm
left a comment
There was a problem hiding this comment.
Thanks for the fix, @bowald!
adef8cd
into
AcademySoftwareFoundation:main
33 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up to the PR #2746.
Me and @rasmustilljander continued to look into issues related to upgrading our MaterialX 1.38 materials to MaterialX 1.39.
The PR #2746 solved an issue for custom nodes getting classified as CONSTANTS but without inputs. However, we discover some more appearances having shaders generated with syntax errors not fixed by last PR. This PR tightens the check to make sure only constant/dot nodes are elided.
Here is a "simplified Material" that fails shader code generation on main, where the custom nodes is considered for bypassing even if they have 2 outputs (i.e. not a constant node).
This is the content of the nodegraph NG_APPEARANCE, where both

custom_a_inst01,custom_b_inst01are considered constant and on main they will be elided even though that is incorrect.