Comments (4)
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. :)
from hlslmaterial.
Thanks for the feedback!
The plugin is indeed pretty simple & doesn't translate the actual HLSL into a shader graph.
Doing so would require parsing the HLSL code itself, which would be way out of the scope of the plugin.
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.
from hlslmaterial.
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 2 * 10 * 12
would be constant-folded to become just 240 without any multiply operations. A Custom node in the Material Editor (according to Epic) would not benefit from this and instead would have each multiplication operation as part of the compiled shader code.
https://en.wikipedia.org/wiki/Constant_folding
from hlslmaterial.
Gotcha :)
Actually, "classic" constant folding is already done by the shader compiler - if you have 2 * 10 * 12
the bytecode will just use 240.
The unreal constant folding is to apply that to "constant" parameters that aren't known at the shader compile time. Eg, if you have sin(MyParameter)
unreal can precompute the sin when you set MyParameter
, only doing the operation once instead of once per pixel per frame.
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.
from hlslmaterial.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hlslmaterial.