Dynamic flow control in materials

I have tried to replicate your results, but I could not do so. I have tested in both 4.25.1 and 4.22.2, and both versions give me the same result, that no branching actually happens:

You see the material has a bunch of very heavy noise nodes, to see if it works or not. I have placed a plane in the level with this material applied, and set the screen percentage to 200% to easily see any performance issues caused by the pixel shader.

No matter if the Param is 0 or 1, my Base Pass takes around 17 ms in this case. If I replace the “Param” parameter with a static “0”, the Base Pass time goes down to 0.5 ms, so that’s how it should be if it would work.

Have you done anything else to make it work for you?