Download

Materials: "IF" node cost approximation?

Hi!

How expensive is the if-node in unreal materials?
Are there some undirect cost related issues with using if-node one should know about?

Permission to make a lol.

If cost = low thendo cheap
If cost = high thendo expensive

I dont know the exact costs, and there are cases where its probably useful, but avoid where possible.
remembers a bookmark https://www.froyok.fr/blog/2017-03-stop-using-the-if-node
It also mentions the sign node, while Froyok mentioned it being a custom node, the Sign node has been available now without the need of custom code.

If material expression is not the IF that you should beware of. Just use it, where you deem fit.

But only IF you need it :stuck_out_tongue:

IF and only IF

Static switch is for master materials, if-node has negligible cost.

Thanks for the answers!
I was told that IF node in materials is not a branch, but a pick node. So it wont impede with parallel calculations(or smth?)

ps. Love your work with particles Luos!

awww, thanks :slight_smile: