Dynamic flow control in materials

Again, I think you should probably do some research on how GPUs work and I think you’re probably misunderstanding the difference between a high level language and how it gets compiled into a low level language. The difference lies within the compiler and how it interprets attributes like [branch]… You won’t know unless you have access to the source code of that compiler.

Also, yet again, regardless of what state the branch is in, it will need to have BOTH branches ready to go at any moment. That means it will need all of the “nodes” and the textures, ready to go. The tradeoff lies in which set of instructions to execute; which is where the performance savings come in. Otherwise, you’d need to do what I was saying earlier and have the compiler make a separate shader for EACH potential combination of the material “tree” and load ALL of them into the ram, so that they are ready to be switched to; on demand. Which again, is exactly why the switch node is NOT changeable at runtime; under normal circumstances.

Here is it branching with textures… Exact same results… And yes, yet again, my laptop is a toaster and will have a high frame time, even with an empty scene, at 1080p epic settings.

1 Like