Develop
Develop
Select your platform

Strip Unused Shaders

Updated: Feb 18, 2025
You can reduce build times, build file size, and runtime memory usage by preventing unused shaders from being compiled in your project build (i.e., “stripping” shaders).
This page provides instructions on stripping unused shaders from a Meta XR Unity project built on the Built-In Render Pipeline.
Note: Shader stripping is disabled for Scriptable Render Pipelines, such as the prebuilt Universal Render Pipeline.

Prerequisites

Understand shader stripping

Unity’s default Built-In Render Pipeline offers three graphics tiers (Tier 1, Tier 2, and Tier 3) to customize the built-in shader compilation and rendering quality, and they correspond to target platforms for which you’re developing apps.
Android apps developed in Unity, by default, load shaders from only Tier 2. Shaders from Tier 1 and Tier 3 are built, which increases the build time, but the app does not load any shaders from those tiers. The shader stripping mechanism enables you to easily prevent unused shaders from being compiled, significantly reducing build time.
If you choose to strip unused shaders, at the time of shader compilation, the system starts by checking the Meta Horizon platform. If the platform is Android, Unity removes Tier 1 and Tier 3 shaders from the list of shaders and compiles shaders from only Tier 2.

Enable shader stripping

  1. In the Hierarchy, select OVRCameraRig.
    If you’re using OVRPlayerController, expand it, and then select OVRCameraRig.
  2. In the Inspector, expand the OVR Manager script, and under Quest Features, select Build Settings, and click the checkbox for Skip Unneeded Shaders.

Learn more

Did you find this page helpful?