Why 'if' node doesnt affect the performance?

Hi. I have two sided translucent material. 'Shader complexity shows me that there is no difference between using complex material for both faces and separated by ‘if’ nodes complex material for frontfaces + very simple material for backfaces.
So my question is: Does ‘if’ node affects the performance or not?

EDIT:
For my test I added 1500 spheres with my material on it to increase GPU time up to 300ms and switched between two materials. This is why I want to change my question to “why ‘if’ node doesnt affect the performance?”. Some code shouldnt be executed if condition fails, right? And if its not executed then why performance is the same?

What does your stats tell you?

^ Question is updated ^

Material nodes aren’t like the blueprint nodes. I’m not 100% certain but it still does all the calculations even thou it doesn’t use the end result.
so both of the calculations are done and probably check afterwards which one to use.

jensH is correct, the IF node is not for static use, so you probably make it worse in this case by trying to use simple math on backfaces.

For your situation you need to separate the backfaces into a separate material ID or mesh, so they can use a different material (or an instance of that material, with static switches used to truly turn off all the calculations you don’t need on the backfaces).

Apparently the IF statement can take advantage of some graphics hardware with some kind of “branch prediction”, so in runtime it could possibly help a little, depending on the hardware. You won’t see that show up in the instruction count or shader complexity view though, and from what I hear (from Epic staff explanations), in practice it mostly seems to just calculate both branches of the IF statement all the time. So personally I use Lerps instead, so I know exactly what the performance is going to be (and it avoids some further possible problems with IF statements that can occur on hardware like PS3 for example).

I’ve read about HLSL a bit and I realized that branching isnt good for performance.
LMGTFY - Let Me Google That For You google helped me a lot and explained some things about hlsl

The IF node is not improving performance because of the way it is implemented in the material editor. Take a look at this thread.

Please, also take your time to upvote these:
Request1
Request2