@ Thanks for answering.
Result is pretty much the same. Whatever is done in custom node, gets branched correctly.
If i plug texture samples results into a custom node with if statement, then both textures are sampled and result is chosen in custom node.
equals threshold changes nothing for me. It is still choosing between two sampled values, rather than producing a branch.