# controlling a StaticSwitch with a Float/Scalar/Constant 1 in a Material

**URL:** <https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299743>\
**Category:** Rendering\
**Tags:** bool, float, unreal-engine, question\
**Created:** [November 24, 2014, 2:29pm UTC](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299743 "2014-11-24T14:29:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [November 25, 2014, 5:03pm UTC](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299743/2 "2014-11-25T17:03:40Z")

</div>

Hey DarknesZ -

Your big problem is going to be getting the Switch to function at all. Despite its tag in the Material Editor, it is actually known as a Static Switch because it will only exist at compile time and not at runtime. So even if it were possible to pass a Dynamic Parameter into the Switch you would not be able to change the value in Cascade.

However there is an easy replacement, use a LERP. You would just need to make sure that Cascade only every receives a hard 0 or hard 1 and you would not see the fade from one to another. In this case simple plug the Dynamic Parameter directly into the LERP’s alpha.

Thank You

Eric Ketchum

---

_[View the full topic](https://forums.unrealengine.com/t/controlling-a-staticswitch-with-a-float-scalar-constant-1-in-a-material/299743)._
