Materials for Mobile Platforms

Choose your OS:

Materials on mobile platforms (Feature Level ES 2) use the same node-based creation process used by other platforms. Almost all of the Material inputs are available to mobile Materials, and Materials will generally look and behave the same on mobile platforms as they do on other platforms. For instance, the following Material inputs all work exactly the same on mobile platforms as they do on PC.

  • BaseColor

  • Roughness

  • Metallic

  • Specular

  • Normal

  • Emissive

There are some considerations you must take into account when creating Materials to be used on mobile platforms, however:

  • You are only allowed to use 5 texture samplers due to hardware limitations.

  • Only Default and Unlit shading models are available.

  • Customized UVs should be used to avoid dependent texture fetches (no math on texture UVs).

  • Translucent and Masked Materials are extremely expensive. It is recommended that you use Opaque Materials wherever possible.

  • Depth fade can be used in translucent Materials for iOS platforms. It is not supported on platforms where the hardware does not support fetching from the depth buffer and emulating this would incur an unacceptable performance cost.

In addition, some features are simply not available on mobile platforms.

  • Scene Color expression

  • Refraction input

  • Tessellation input

  • Subsurface Scattering shading model

Feature Level ES 3.1

Feature Level ES 3.1 exists to target high-end mobile devices (such as Metal-compatible devices). This gives access to up to 16 total samplers to be used in Materials. To maintain compatibility with older devices, use the Feature Level Switch Material node.

Mobile-Specific Material Settings

The following Material properties are to help optimize and or reduce the rendering cost of the Material when used on a mobile device.

Property

Description

bFullyRough

When enabled, saves a number of shader ALU instructions and one sampler. This effectively disables Specular while maintaining overall reflective energy.

High Quality Reflections

Enables high quality reflections in the forward renderer. Enabling this setting reduces the number of samplers available to the Material as two more samplers will be used for reflections cubemaps.

bUseLightmapDirectionality

When disabled, lighting from lightmaps will be flat but cheaper.

Use Full Precision

When enabled, the Material's shader will use the highest precision math available on a mobile device. This can be used to work around rendering problems caused by low-precision math, such as usage of world coordinates or tight specular reflections on glossy materials.

Enabling full precision shaders will make the Material more expensive.

Full Precision Off

Full Precision On

Troubleshooting Materials for Mobile

Due to hardware differences between PCs and mobile devices you could run into issues with certain options working on the PC but not working when viewed on a mobile device. The following list contains some of the more common issues you could run into and ways to fix them.

Issue

Solution

Default Material is displayed in the Mobile Previewer.

Open the log file in Engine\Saved and search for error messages to know how to fix the Material.

Material Animation with Time Expressions looks choppy but framerate is good elsewhere.

Make sure the Period property is enabled in the Time expression along with a Period. This will move the computation to the CPU and run at full-precision instead of half.

Materials using World Coordinates computations or very small values are not being displayed correctly.

Try enabling the Use Full Precision option on the Material that is not displaying correctly on a mobile device. The precision level of Materials on Mobile devices is often truncated to one or two decimal places to help with performance. Enabling Use Full Precision will make sure that the Material's precision kept to the values that are set in the Material Editor.

Materials look fine in the editor but not on device.

To get a better idea of what Materials will look like when viewed on a mobile device, you can change the Preview Rendering Level of the UE4 editor to simulate the rendering capabilities of the device you are targeting. Check out the Mobile Previewer page for more information on how to do this.

Tags