Just my raised hand, but I too would like to understand this better.
I know a few years ago dynamic-branching was a very popular topic but I am still unaware of the in’s and out’s. ref: Dynamic flow control in materials (Ty @DeathreyCG for this and your ocean-thingie)
I don’t even know how to get it set up, if it requires a custom-node, or if there are best-practices…
Anyone that wants to chime in on this is welcome (please?).
edit: Only guy I found on youtube, 6ys old… ref: https://www.youtube.com/@MPRX87
He seems to be doing what you are doing OP, just-embedding an IF statement in the custom-node…