Materials for Mobile Platforms
Overview
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
Property | Description |
---|---|
bFullyRough | When enabled, saves a number of shader ALU instructions and one sampler. This effectively disables Specular while maintaining overall reflective energy. |
bUseLightmapDirectionality | When disabled, lighting from lightmaps will be flat but cheaper. |
Troubleshooting Materials for Mobile
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. |
Comments
Post a Comment