-
Notifications
You must be signed in to change notification settings - Fork 67
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
Including Operations Only Possible in Custom Nodes Causes the Entire Function To Be Inside A Custom Node #1
Comments
Thanks for the feedback! The plugin is indeed pretty simple & doesn't translate the actual HLSL into a shader graph. Out of curiosity, do you have examples where constant folding really improves performance? I've always been curious to see how important is really is. |
No problem, I figured it might be out of scope. One day perhaps :) I'm not a programmer, but constant folding seems to apply to code compiling in general. From what I understand, something like |
Gotcha :) Actually, "classic" constant folding is already done by the shader compiler - if you have The unreal constant folding is to apply that to "constant" parameters that aren't known at the shader compile time. Eg, if you have As far as I can tell this can be useful in some very specific scenarios, but in the vast majority of cases it shouldn't matter much if at all. |
Oh cool, thanks for the extra info! This makes sense. It would be ideal to have that separation with this plug-in if only just to maintain team-accessible graphs. But as you said, out of scope for the time being. :) |
Ideally this plugin would be able to differentiate between content that needs to definitely be part of a Custom node and everything else in order to take advantage of constant folding.
Function code:
Generated graph:
Expected format: Intensity parameter and X output are not used within the while loop, and therefore could be broken out from the custom node:
The text was updated successfully, but these errors were encountered: