# Material Function Bool Branch

**URL:** <https://forums.unrealengine.com/t/material-function-bool-branch/447773>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [April 24, 2019, 12:18pm UTC](https://forums.unrealengine.com/t/material-function-bool-branch/447773 "2019-04-24T12:18:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HajimeXNagumo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HajimeXNagumo](https://forums.unrealengine.com/u/HajimeXNagumo)\
**Post date:** [April 24, 2019, 12:18pm UTC](https://forums.unrealengine.com/t/material-function-bool-branch/447773/1 "2019-04-24T12:18:07Z")

</div>

Hello,

I try to create a little effect via material function but I want to turn this effect with a bool on and off but fast I realized that I have no option to branch my bool or to convert it to a int/float for 0 or 1. So whats the workaround that I can use a bool Input and check for true 1 or false 0 to output the correct value depend on my input boolean?

Greets

---

<div class="post-metadata">

**Author:** ![Unfathomable](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Unfathomable](https://forums.unrealengine.com/u/Unfathomable)\
**Post date:** [April 24, 2019, 12:58pm UTC](https://forums.unrealengine.com/t/material-function-bool-branch/447773/2 "2019-04-24T12:58:15Z")

</div>

You can use the “Switch” node in your Material Function. The control boolean goes in the “Value” and your two possible outputs into “True” and “False”

---

<div class="post-metadata">

**Author:** ![HajimeXNagumo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HajimeXNagumo](https://forums.unrealengine.com/u/HajimeXNagumo)\
**Post date:** [April 25, 2019, 2:40pm UTC](https://forums.unrealengine.com/t/material-function-bool-branch/447773/3 "2019-04-25T14:40:35Z")

</div>

Thanks, that works 🙂
