# Is there a way to switch material surface types based on ES2 compatibility?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-switch-material-surface-types-based-on-es2-compatibility/454195>\
**Category:** Rendering\
**Tags:** Mobile, es2, unreal-engine, Shaders, question\
**Created:** [August 21, 2019, 4:13pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-switch-material-surface-types-based-on-es2-compatibility/454195 "2019-08-21T16:13:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paradoc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@paradoc](https://forums.unrealengine.com/u/paradoc)\
**Post date:** [August 21, 2019, 4:13pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-switch-material-surface-types-based-on-es2-compatibility/454195/1 "2019-08-21T16:13:58Z")

</div>

Hello,  
I’m building a version of a game designed for both VR Desktop and VR Mobile. On desktop, I’m using a lot of translucency and dynamic lighting (within performance limitations). However, on mobile, none of this converts well, and so i would like to switch the shader type from translucent to opaque where necessary in the root materials. Is there a way to do this in the shader, or does it just make more sense to create an alternate set of materials and apply at runtime if a mobile platform is detected? (Oculus Rift vs Oculus Go)
